]> 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>
Wed, 3 Jul 2024 21:22:36 +0000 (14:22 -0700)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 Aug 2024 11:53:51 +0000 (13:53 +0200)
commitc49b8baab9cb2c5484b00cd114d70e7d06283984
tree540efeb97935a95bf57a3557a556e812b8fcb15b
parent441da1f0bd66cccdfdda68716cd21586d4ccae10
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