On 2025-03-21 09:31:31, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > If repair does not discover even a single quota file, then don't have it > try to create a /quota metadir to hold them. This avoids pointless > repair failures on quota-less filesystems that are nearly full. > > Found via generic/558 on a zoned=1 filesystem. > > Cc: <linux-xfs@xxxxxxxxxxxxxxx> # v6.13.0 > Fixes: b790ab2a303d58 ("xfs_repair: support quota inodes in the metadata directory") > Signed-off-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> > --- > repair/phase6.c | 5 +++++ > 1 file changed, 5 insertions(+) > > > diff --git a/repair/phase6.c b/repair/phase6.c > index 4064a84b24509f..2d526dda484293 100644 > --- a/repair/phase6.c > +++ b/repair/phase6.c > @@ -3538,6 +3538,11 @@ reset_quota_metadir_inodes( > struct xfs_inode *dp = NULL; > int error; > > + if (!has_quota_inode(XFS_DQTYPE_USER) && > + !has_quota_inode(XFS_DQTYPE_GROUP) && > + !has_quota_inode(XFS_DQTYPE_PROJ)) > + return; > + > error = -libxfs_dqinode_mkdir_parent(mp, &dp); > if (error) > do_error(_("failed to create quota metadir (%d)\n"), > LGTM Reviewed-by: Andrey Albershteyn <aalbersh@xxxxxxxxxx> -- - Andrey