summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-05-12 12:49:19 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-05-20 08:33:30 -0700
commit2aae28759abf9ca09b322f04fabff7a3dccee789 (patch)
treed7f239cb6852b4f8b03ee61f6586b3736150eccb /fs/f2fs
parente3c2b047475b52739bcf178a9e95176c42bbcf8f (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 and update the code comments a bit. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/f2fs')
0 files changed, 0 insertions, 0 deletions