]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: fix 32-bit truncation in xfs_compute_rextslog
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 23:07:33 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:24 +0000 (14:06 -0700)
commita8ef1c96a30925e71cfdd46fe4701e84b463b1f5
tree4f5cdcd10ff4c60b6e82230260558296abd26b9d
parenteb2a50fdbb4b35ec0cbdd6b77b8c96650f2b9225
xfs: fix 32-bit truncation in xfs_compute_rextslog

Source kernel commit: cf8f0e6c1429be7652869059ea44696b72d5b726

It's quite reasonable that some customer somewhere will want to
configure a realtime volume with more than 2^32 extents.  If they try to
do this, the highbit32() call will truncate the upper bits of the
xfs_rtbxlen_t and produce the wrong value for rextslog.  This in turn
causes the rsumlevels to be wrong, which results in a realtime summary
file that is the wrong length.  Fix that.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
libxfs/xfs_rtbitmap.c