xfs: fix maxlevels comparisons in the btree staging code
mainline inclusion from mainline-v5.15-rc4 commit 78e8ec83 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I76JSK CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=78e8ec83a404d63dcc86b251f42e4ee8aff27465 -------------------------------- The btree geometry computation function has an off-by-one error in that it does not allow maximally tall btrees (nlevels == XFS_BTREE_MAXLEVELS). This can result in repairs failing unnecessarily on very fragmented filesystems. Subsequent patches to remove MAXLEVELS usage in favor of the per-btree type computations will make this a much more likely occurrence. Signed-off-by:Darrick J. Wong <djwong@kernel.org> Reviewed-by:
Chandan Babu R <chandan.babu@oracle.com> Reviewed-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Guo Xuenan <guoxuenan@huawei.com> Signed-off-by:
Long Li <leo.lilong@huawei.com>
Loading
Please sign in to comment