summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_inode_buf.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-05-12 16:56:24 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-05-25 18:49:50 -0700
commitc3628229d2b378415a98b4a696566b736cb22785 (patch)
treef656e1fe53dd5fdb72fc98d42b08370642c5e0af /fs/xfs/libxfs/xfs_inode_buf.c
parent7248e6e9cb33a2aeaa1efe3a48e2c023d948b524 (diff)
xfs: standardize extent size hint validation
While chasing a bug involving invalid extent size hints being propagated into newly created realtime files, I noticed that the xfs_ioctl_setattr checks for the extent size hints weren't the same as the ones now encoded in libxfs and used for validation in repair and mkfs. Because the checks in libxfs are more stringent than the ones in the ioctl, it's possible for a live system to set inode flags that immediately result in corruption warnings. Specifically, it's possible to set an extent size hint on an rtinherit directory without checking if the hint is aligned to the realtime extent size, which makes no sense since that combination is used only to seed new realtime files. Replace the open-coded and inadequate checks with the libxfs verifier versions. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_buf.c')
0 files changed, 0 insertions, 0 deletions