On Sat, Jun 11, 2022 at 02:41:52AM -0700, Allison Henderson wrote: > We need to add, remove or modify parent pointer attributes during > create/link/unlink/rename operations atomically with the dirents in the > parent directories being modified. This means they need to be modified > in the same transaction as the parent directories, and so we need to add > the required space for the attribute modifications to the transaction > reservations. > > [achender: rebased, added xfs_sb_version_hasparent stub] > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> > Signed-off-by: Allison Henderson <allison.henderson@xxxxxxxxxx> > --- > fs/xfs/libxfs/xfs_format.h | 5 ++ > fs/xfs/libxfs/xfs_trans_resv.c | 103 +++++++++++++++++++++++++++------ > fs/xfs/libxfs/xfs_trans_resv.h | 1 + > 3 files changed, 90 insertions(+), 19 deletions(-) > > diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h > index afdfc8108c5f..96976497306c 100644 > --- a/fs/xfs/libxfs/xfs_format.h > +++ b/fs/xfs/libxfs/xfs_format.h > @@ -390,6 +390,11 @@ xfs_sb_has_incompat_feature( > return (sbp->sb_features_incompat & feature) != 0; > } > > +static inline bool xfs_sb_version_hasparent(struct xfs_sb *sbp) > +{ > + return false; /* We'll enable this at the end of the set */ > +} Just noticed this in passing - I have not looked at the reservation calculations at all yet. We don't use "xfs_sb_version" feature checks anymore. This goes into xfs_mount.h as a feature flag and we use xfs_has_parent_pointers(mp) to check for the feature rather that superblock bits. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx