diff options
| author | Dave Chinner <[email protected]> | 2021-08-19 01:46:26 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2021-08-19 17:07:12 +0000 |
| commit | a1d86e8dec8c1325d301c9d5594bb794bc428fc3 (patch) | |
| tree | f71195aebaf5b4b76ff5cc534c0e393579ae9d80 /fs/xfs/xfs_rtalloc.c | |
| parent | xfs: rework attr2 feature and mount options (diff) | |
| download | kernel-a1d86e8dec8c1325d301c9d5594bb794bc428fc3.tar.gz kernel-a1d86e8dec8c1325d301c9d5594bb794bc428fc3.zip | |
xfs: reflect sb features in xfs_mount
Currently on-disk feature checks require decoding the superblock
fileds and so can be non-trivial. We have almost 400 hundred
individual feature checks in the XFS code, so this is a significant
amount of code. To reduce runtime check overhead, pre-process all
the version flags into a features field in the xfs_mount at mount
time so we can convert all the feature checks to a simple flag
check.
There is also a need to convert the dynamic feature flags to update
the m_features field. This is required for attr, attr2 and quota
features. New xfs_mount based wrappers are added for this.
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
| -rw-r--r-- | fs/xfs/xfs_rtalloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 699066fb9052..f3eb4bf06423 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1131,6 +1131,9 @@ error_cancel: error = xfs_trans_commit(tp); if (error) break; + + /* Ensure the mount RT feature flag is now set. */ + mp->m_features |= XFS_FEAT_REALTIME; } if (error) goto out_free; |
