]> 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>
Tue, 9 Jan 2024 17:40:33 +0000 (09:40 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 10 Apr 2024 00:21:48 +0000 (17:21 -0700)
commite36c42f49c29396d535333f9b2018db38d6ccc67
treeebdc68745df9c246386ae77717810203481f90fb
parentd29837c0ad10a0c8f19c219d22db4abb0a228f95
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