]> 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>
Fri, 15 Jul 2022 21:34:50 +0000 (14:34 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 22 Nov 2023 23:03:42 +0000 (15:03 -0800)
commit1778b3dbcceed23f9f2e5a74c87dd3e91c0ab3d8
tree18e1af9bdfc5bfb228c0fe0a092c208968e0a8cf
parente433e059623964fb9046717774cb25504edf1db1
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