All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v9 2/6] xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD
Date: Tue, 25 Jun 2013 15:32:27 +1000	[thread overview]
Message-ID: <20130625053227.GS29376@dastard> (raw)
In-Reply-To: <1372112724.22504.77.camel@chandra-dt.ibm.com>

On Mon, Jun 24, 2013 at 05:25:24PM -0500, Chandra Seetharaman wrote:
> On Mon, 2013-06-24 at 15:59 +1000, Dave Chinner wrote:
> > On Sun, Jun 23, 2013 at 09:48:23PM -0500, Chandra Seetharaman wrote:
> > > Remove all incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD. Instead,
> > > start using XFS_GQUOTA_.* XFS_PQUOTA_.* counterparts for GQUOTA and
> > > PQUOTA respectively.
> > > 
> > > On-disk copy still uses XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD.
> > > 
> > > Read and write of the superblock does the conversion from *OQUOTA*
> > > to *[PG]QUOTA*.
> > > 
> > > Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
> > > ---
> > >  fs/xfs/xfs_mount.c       |   46 ++++++++++++++++++++++++++++++++++++++++++++++
> > >  fs/xfs/xfs_qm.c          |    9 ++++++---
> > >  fs/xfs/xfs_qm_syscalls.c |   39 +++++++++++++++++++++------------------
> > >  fs/xfs/xfs_quota.h       |   42 ++++++++++++++++++++++++++++--------------
> > >  fs/xfs/xfs_quotaops.c    |    6 ++++--
> > >  fs/xfs/xfs_super.c       |   16 ++++++++--------
> > >  fs/xfs/xfs_trans_dquot.c |    4 ++--
> > >  7 files changed, 115 insertions(+), 47 deletions(-)
> > > 
> > > diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> > > index 6a19434..e2e14cb 100644
> > > --- a/fs/xfs/xfs_mount.c
> > > +++ b/fs/xfs/xfs_mount.c
> > > @@ -336,6 +336,14 @@ xfs_mount_validate_sb(
> > >  		return XFS_ERROR(EWRONGFS);
> > >  	}
> > >  
> > > +	if ((sbp->sb_qflags & (XFS_OQUOTA_ENFD | XFS_OQUOTA_CHKD)) &&
> > > +			(sbp->sb_qflags & (XFS_PQUOTA_ENFD | XFS_GQUOTA_ENFD |
> > > +				XFS_PQUOTA_CHKD | XFS_GQUOTA_CHKD))) {
> > > +		xfs_notice(mp,
> > > +"Super block has XFS_OQUOTA bits along with XFS_PQUOTA and/or XFS_GQUOTA bits.\n");
> > > +		return XFS_ERROR(EFSCORRUPTED);
> > > +	}
> > > +
> > >  	/*
> > >  	 * Version 5 superblock feature mask validation. Reject combinations the
> > >  	 * kernel cannot support up front before checking anything else. For
> > > @@ -622,6 +630,35 @@ xfs_sb_from_disk(
> > >  	to->sb_lsn = be64_to_cpu(from->sb_lsn);
> > >  }
> > >  
> > > +static inline void
> > > +xfs_handle_quota_to_disk(
> > > +	xfs_dsb_t	*to,
> > > +	xfs_sb_t	*from,
> > > +	__int64_t	*fields)
> > 
> > An "XFS handle" has meaning in the namespace (i.e. an XFS filehandle
> > as used in xfs_ioctl.c and defined in xfs_fs.h, so this is not a
> > good name.
> > 
> > Realistically, xfs_sb_qflags_to_disk() is more appropriate for it's
> > function....
> 
> I agree with your "handle" comment.
> 
> As you can see in patch 4/6, PQUOTINO logic is also added to this
> function. Can you suggest a name inclusive of that ?

xfs_sb_quota_to/from_disk()?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-06-25  5:32 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24  2:48 [PATCH v9 0/6] Allow pquota and gquota to be used together Chandra Seetharaman
2013-06-24  2:48 ` [PATCH v9 1/6] xfs: Move code around and remove typedefs Chandra Seetharaman
2013-06-24  5:31   ` Dave Chinner
2013-06-24 22:21     ` Chandra Seetharaman
2013-06-24 21:36   ` Ben Myers
2013-06-24 23:23     ` Chandra Seetharaman
2013-06-24  2:48 ` [PATCH v9 2/6] xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
2013-06-24  5:59   ` Dave Chinner
2013-06-24 22:25     ` Chandra Seetharaman
2013-06-25  5:32       ` Dave Chinner [this message]
2013-06-24  2:48 ` [PATCH v9 3/6] xfs: Add pquota fields where gquota is used Chandra Seetharaman
2013-06-24  8:00   ` Dave Chinner
2013-06-24 22:33     ` Chandra Seetharaman
2013-06-24 23:25     ` Chandra Seetharaman
2013-06-25  5:33       ` Dave Chinner
2013-06-24  2:48 ` [PATCH v9 4/6] xfs: Start using pquotaino from the superblock Chandra Seetharaman
2013-06-25  6:31   ` Dave Chinner
2013-07-01 15:50     ` Chandra Seetharaman
2013-07-04  1:12       ` Dave Chinner
2013-07-08 23:20         ` Chandra Seetharaman
2013-07-09  1:21           ` Dave Chinner
2013-07-09 21:06             ` Chandra Seetharaman
2013-06-24  2:48 ` [PATCH v9 5/6] xfs: Add proper versioning support to fs_quota_stat Chandra Seetharaman
2013-06-25  6:43   ` Dave Chinner
2013-06-25 22:36     ` Chandra Seetharaman
2013-06-26  1:20       ` Dave Chinner
2013-06-24  2:48 ` [PATCH v9 6/6] xfs: Use new qs_pquota field in fs_quota_stat for Q_XGETQSTAT Chandra Seetharaman
2013-06-25  6:45   ` Dave Chinner

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=20130625053227.GS29376@dastard \
    --to=david@fromorbit.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.