mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
xfs: enable metadir [v5.5 09/10]
Actually enable this very large feature, which adds metadata directory trees, allocation groups on the realtime volume, persistent quota options, and quota for realtime files. With a bit of luck, this should all go splendidly. Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZyqQdAAKCRBKO3ySh0YR pvjKAP9A1v0QwkBo65ARf1gQb2AZYlebV8o6faSrpc+10vOPxgD/SV3GKhxQrtaT gOswA6f9QJN3E82IJ6fR2PZgSke+iQs= =xjZL -----END PGP SIGNATURE----- Merge tag 'metadir-6.13_2024-11-05' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into staging-merge xfs: enable metadir [v5.5 09/10] Actually enable this very large feature, which adds metadata directory trees, allocation groups on the realtime volume, persistent quota options, and quota for realtime files. With a bit of luck, this should all go splendidly. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
commit
052378aef8
@ -403,7 +403,8 @@ xfs_sb_has_ro_compat_feature(
|
||||
XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR | \
|
||||
XFS_SB_FEAT_INCOMPAT_NREXT64 | \
|
||||
XFS_SB_FEAT_INCOMPAT_EXCHRANGE | \
|
||||
XFS_SB_FEAT_INCOMPAT_PARENT)
|
||||
XFS_SB_FEAT_INCOMPAT_PARENT | \
|
||||
XFS_SB_FEAT_INCOMPAT_METADIR)
|
||||
|
||||
#define XFS_SB_FEAT_INCOMPAT_UNKNOWN ~XFS_SB_FEAT_INCOMPAT_ALL
|
||||
static inline bool
|
||||
|
@ -147,14 +147,14 @@ xchk_superblock(
|
||||
if (xfs_has_metadir(sc->mp)) {
|
||||
if (sb->sb_metadirino != cpu_to_be64(mp->m_sb.sb_metadirino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
} else {
|
||||
if (sb->sb_rbmino != cpu_to_be64(mp->m_sb.sb_rbmino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
|
||||
if (sb->sb_rsumino != cpu_to_be64(mp->m_sb.sb_rsumino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
}
|
||||
|
||||
if (sb->sb_rbmino != cpu_to_be64(mp->m_sb.sb_rbmino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
|
||||
if (sb->sb_rsumino != cpu_to_be64(mp->m_sb.sb_rsumino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
|
||||
if (sb->sb_rextsize != cpu_to_be32(mp->m_sb.sb_rextsize))
|
||||
xchk_block_set_corrupt(sc, bp);
|
||||
|
||||
@ -229,11 +229,13 @@ xchk_superblock(
|
||||
* sb_icount, sb_ifree, sb_fdblocks, sb_frexents
|
||||
*/
|
||||
|
||||
if (sb->sb_uquotino != cpu_to_be64(mp->m_sb.sb_uquotino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
if (!xfs_has_metadir(mp)) {
|
||||
if (sb->sb_uquotino != cpu_to_be64(mp->m_sb.sb_uquotino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
|
||||
if (sb->sb_gquotino != cpu_to_be64(mp->m_sb.sb_gquotino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
if (sb->sb_gquotino != cpu_to_be64(mp->m_sb.sb_gquotino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip the quota flags since repair will force quotacheck.
|
||||
@ -349,8 +351,10 @@ xchk_superblock(
|
||||
if (sb->sb_spino_align != cpu_to_be32(mp->m_sb.sb_spino_align))
|
||||
xchk_block_set_corrupt(sc, bp);
|
||||
|
||||
if (sb->sb_pquotino != cpu_to_be64(mp->m_sb.sb_pquotino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
if (!xfs_has_metadir(mp)) {
|
||||
if (sb->sb_pquotino != cpu_to_be64(mp->m_sb.sb_pquotino))
|
||||
xchk_block_set_preen(sc, bp);
|
||||
}
|
||||
|
||||
/* Don't care about sb_lsn */
|
||||
}
|
||||
@ -361,6 +365,14 @@ xchk_superblock(
|
||||
xchk_block_set_corrupt(sc, bp);
|
||||
}
|
||||
|
||||
if (xfs_has_metadir(mp)) {
|
||||
if (sb->sb_rgcount != cpu_to_be32(mp->m_sb.sb_rgcount))
|
||||
xchk_block_set_corrupt(sc, bp);
|
||||
|
||||
if (sb->sb_rgextents != cpu_to_be32(mp->m_sb.sb_rgextents))
|
||||
xchk_block_set_corrupt(sc, bp);
|
||||
}
|
||||
|
||||
/* Everything else must be zero. */
|
||||
if (memchr_inv(sb + 1, 0,
|
||||
BBTOB(bp->b_length) - sizeof(struct xfs_dsb)))
|
||||
|
Loading…
Reference in New Issue
Block a user