]> git.baikalelectronics.ru Git - 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)
commitf68dbde04978ca04c8e0d3d080376ce87f59dae4
tree9e766de4b4ebf39c968f52b1bdf1a75857a205f7
parent35c2cec33759e143b1bfaf0bb59c630fb7cfbbda
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 70fdacdeaede.

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: 70fdacdeaede ("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