]> git.ipfire.org Git - people/arne_f/kernel.git/commit
xfs: correct the narrative around misaligned rtinherit/extszinherit dirs
authorDarrick J. Wong <djwong@kernel.org>
Mon, 12 Jul 2021 19:58:50 +0000 (12:58 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 15 Jul 2021 16:58:42 +0000 (09:58 -0700)
commit83193e5ebb0164d612aa620ceab7d3746e80e2a4
tree9e766de4b4ebf39c968f52b1bdf1a75857a205f7
parent5838d0356bb3c320867c393f12b169c01a870bda
xfs: correct the narrative around misaligned rtinherit/extszinherit dirs

While auditing the realtime growfs code, I realized that the GROWFSRT
ioctl (and by extension xfs_growfs) has always allowed sysadmins to
change the realtime extent size when adding a realtime section to the
filesystem.  Since we also have always allowed sysadmins to set
RTINHERIT and EXTSZINHERIT on directories even if there is no realtime
device, this invalidates the premise laid out in the comments added in
commit 603f000b15f2.

In other words, this is not a case of inadequate metadata validation.
This is a case of nearly forgotten (and apparently untested) but
supported functionality.  Update the comments to reflect what we've
learned, and remove the log message about correcting the misalignment.

Fixes: 603f000b15f2 ("xfs: validate extsz hints against rt extent size when rtinherit is set")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_inode_buf.c
fs/xfs/libxfs/xfs_trans_inode.c
fs/xfs/xfs_ioctl.c