summaryrefslogtreecommitdiff
path: root/fs/compat.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-07-09 19:16:58 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-07-19 12:59:01 -0700
commit83f32e6c52581ceba2e8a873995f09e50ea73287 (patch)
tree839a87f8e06b0fa692866d869c9fcfd4a67db297 /fs/compat.c
parent46d51be7ea884258d054b37946dd285aa5e4847f (diff)
xfs: bump INUMBERS cursor correctly in xfs_inumbers_walk
There's a subtle unit conversion error when we increment the INUMBERS cursor at the end of xfs_inumbers_walk. If there's an inode chunk at the very end of the AG /and/ the AG size is a perfect power of two, the startino of that last chunk (which is in units of AG inodes) will be 63 less than (1 << agino_log). If we add XFS_INODES_PER_CHUNK to the startino, we end up with a startino that's larger than (1 << agino_log) and when we convert that back to fs inode units we'll rip off that upper bit and wind up back at the start of the AG. Fix this by converting to units of fs inodes before adding XFS_INODES_PER_CHUNK so that we'll harmlessly end up pointing to the next AG. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/compat.c')
0 files changed, 0 insertions, 0 deletions