]> www.infradead.org Git - users/hch/xfsprogs.git/commit
mkfs: validate CoW extent size hint when rtinherit is set
authorDarrick J. Wong <djwong@kernel.org>
Thu, 15 Aug 2024 18:58:32 +0000 (11:58 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 16 Aug 2024 21:57:45 +0000 (14:57 -0700)
commitb8d5af35df227d2f45a9512b80c21b593f31ec28
treeaeadae77fec2383ad93242aaf25d2ce2df51efaf
parentfe997dedcc11ec62921652845db66597bcddcb7e
mkfs: validate CoW extent size hint when rtinherit is set

Extent size hints exist to nudge the behavior of the file data block
allocator towards trying to make aligned allocations.  Therefore, it
doesn't make sense to allow a hint that isn't a multiple of the
fundamental allocation unit for a given file.

This means that if the sysadmin is formatting with rtinherit set on the
root dir, validate_cowextsize_hint needs to check the hint value on a
simulated realtime file to make sure that it's correct.  This hasn't
been necessary in the past since one cannot have a CoW hint without a
reflink filesystem, and we previously didn't allow rt reflink
filesystems.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
mkfs/xfs_mkfs.c