From: Ben Myers <bpm@sgi.com>
To: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v11 2/4] xfs: Start using pquotaino from the superblock.
Date: Thu, 11 Jul 2013 21:17:34 -0500 [thread overview]
Message-ID: <20130712021734.GA32736@sgi.com> (raw)
In-Reply-To: <1373591398.20769.9.camel@chandra-dt.ibm.com>
Hey Chandra,
On Thu, Jul 11, 2013 at 08:09:58PM -0500, Chandra Seetharaman wrote:
> On Thu, 2013-07-11 at 16:16 -0500, Ben Myers wrote:
> > Hey Chandra,
> >
> > On Thu, Jul 11, 2013 at 12:00:41AM -0500, Chandra Seetharaman wrote:
> > > Start using pquotino and define a macro to check if the
> > > superblock has pquotino.
> > >
> > > Keep backward compatibilty by alowing mount of older superblock
> > > with no separate pquota inode.
> > >
> > > Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
> >
> > Here are a few notes from my review.
> >
> > > + if (sbp->sb_qflags & (XFS_OQUOTA_ENFD | XFS_OQUOTA_CHKD)) {
> > > + xfs_notice(mp,
> > > + "Version 5 of Super block has XFS_OQUOTA bits.\n");
> > > + return XFS_ERROR(EFSCORRUPTED);
> > > + }
> >
> > If I'm reading that right... Now if you had a v5 super block with oquota
> > bits it will become unmountable. Could that happen if you were using
> > crcs and quotas with a 3.10 kernel and then upgrade?
>
> yes. My thinking is that v5 (with crc) is still experimental and not
> supported yet. Not true ?
Right. v5 superblock is still experimental.
> Previously this was being fixed without failing. But, Dave suggested
> that this certainly would be an inconsistent state and hence need to be
> failed. I agreed and changed the code.
Sounds fine. I just wanted to make sure we're all aware of this possibility.
> The problem you stated can be fixed by adding functionality to
> xfs_repair.
Maybe a workaround for those users would be to shut of quotas before upgrading,
and then turn them back on after?
> >
> > > xfs_sb_version_addquota(&mp->m_sb);
> > > mp->m_sb.sb_uquotino = NULLFSINO;
> > > mp->m_sb.sb_gquotino = NULLFSINO;
> > > + mp->m_sb.sb_pquotino = NULLFSINO;
> > >
> > > - /* qflags will get updated _after_ quotacheck */
> > > - mp->m_sb.sb_qflags = 0;
> > > + /* qflags will get updated fully _after_ quotacheck */
> > > + mp->m_sb.sb_qflags = mp->m_qflags & XFS_ALL_QUOTA_ACCT;
> >
> > I didn't quite catch why you changed from 0 to ALL_QUOTA_ACCT here, will
> > take another look.
>
> We wanted to move all (well, almost all :) the logic of managing
> PQUOTINO/GQUOTINO in older superblock in just the two functions
> xfs_sb_quota_to/from_disk(). In order to do that I had to use sb_qflags
> (you can see that in xfs_sb_quota_to_disk()). So, we have to have
> sb_qflags valid before we try to write these fields to the disk. Hence
> this change.
Oh, that explains it. Thanks.
-Ben
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-07-12 2:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 5:00 [PATCH v11 0/4] Allow pquota and gquota to be used together Chandra Seetharaman
2013-07-11 5:00 ` [PATCH v11 1/4] xfs: Add pquota fields where gquota is used Chandra Seetharaman
2013-07-11 15:48 ` Ben Myers
2013-07-11 5:00 ` [PATCH v11 2/4] xfs: Start using pquotaino from the superblock Chandra Seetharaman
2013-07-11 7:52 ` Dave Chinner
2013-07-11 21:16 ` Ben Myers
2013-07-12 1:09 ` Chandra Seetharaman
2013-07-12 2:17 ` Ben Myers [this message]
2013-07-12 14:51 ` Chandra Seetharaman
2013-07-11 5:00 ` [PATCH v11 3/4] xfs: Add proper versioning support to fs_quota_stat Chandra Seetharaman
2013-07-11 8:05 ` Dave Chinner
2013-07-11 8:05 ` Steven Whitehouse
2013-07-11 8:11 ` Dave Chinner
2013-07-11 5:00 ` [PATCH v11 4/4] xfs: Use new qs_pquota field in fs_quota_stat for Q_XGETQSTATV Chandra Seetharaman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130712021734.GA32736@sgi.com \
--to=bpm@sgi.com \
--cc=sekharan@us.ibm.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.