public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Myers <bpm@sgi.com>
To: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: xfs@oss.sgi.com
Subject: Re: [RFC v5 PATCH 2/4] xfs: Add pquota fields where gquota is used.
Date: Fri, 4 May 2012 15:00:32 -0500	[thread overview]
Message-ID: <20120504200032.GV16881@sgi.com> (raw)
In-Reply-To: <20120314202636.17044.11836.sendpatchset@chandra-lucid.austin.ibm.com>

On Wed, Mar 14, 2012 at 03:26:36PM -0500, Chandra Seetharaman wrote:
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index 7c01cda..8800197 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -516,7 +516,7 @@ xfs_setattr_nonsize(
>  		ASSERT(udqp == NULL);
>  		ASSERT(gdqp == NULL);
>  		error = xfs_qm_vop_dqalloc(ip, uid, gid, xfs_get_projid(ip),
> -					 qflags, &udqp, &gdqp);
> +					 qflags, &udqp, &gdqp, NULL);
>  		if (error)
>  			return error;
>  	}
> @@ -552,7 +552,7 @@ xfs_setattr_nonsize(
>  		     (XFS_IS_GQUOTA_ON(mp) && igid != gid))) {
>  			ASSERT(tp);
>  			error = xfs_qm_vop_chown_reserve(tp, ip, udqp, gdqp,
> -						capable(CAP_FOWNER) ?
> +						NULL, capable(CAP_FOWNER) ?
>  						XFS_QMOPT_FORCE_RES : 0);
>  			if (error)	/* out of quota */
>  				goto out_trans_cancel;

I popped an assert in xfs_setattr_nonsize in my testing.  Here is my suggestion:

Index: xfs/fs/xfs/xfs_iops.c
===================================================================
--- xfs.orig/fs/xfs/xfs_iops.c
+++ xfs/fs/xfs/xfs_iops.c
@@ -594,7 +594,8 @@ xfs_setattr_nonsize(
                }
                if (igid != gid) {
                        if (XFS_IS_QUOTA_RUNNING(mp) && XFS_IS_GQUOTA_ON(mp)) {
-                               ASSERT(!XFS_IS_PQUOTA_ON(mp));
+                               ASSERT(xfs_sb_version_has_no_oquota(&mp->m_sb)
+                                      || !XFS_IS_PQUOTA_ON(mp));
                                ASSERT(mask & ATTR_GID);
                                ASSERT(gdqp);
                                olddquot2 = xfs_qm_vop_chown(tp, ip,

-Ben

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

  parent reply	other threads:[~2012-05-04 19:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 20:26 [RFC v5 PATCH 0/4] xfs: Allow pquota and gquota to be used together Chandra Seetharaman
2012-03-14 20:26 ` [RFC v5 PATCH 1/4] xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
2012-03-14 20:26 ` [RFC v5 PATCH 2/4] xfs: Add pquota fields where gquota is used Chandra Seetharaman
2012-05-02 20:49   ` Ben Myers
2012-05-02 22:51     ` Chandra Seetharaman
2012-06-19  7:25     ` Christoph Hellwig
2012-05-04 20:00   ` Ben Myers [this message]
2012-05-04 20:04   ` Ben Myers
2012-03-14 20:26 ` [RFC v5 PATCH 3/4] xfs: Add pquotaino to on-disk super block Chandra Seetharaman
2012-05-03 17:16   ` Ben Myers
2012-05-03 20:16     ` Chandra Seetharaman
2012-05-04 19:52   ` Ben Myers
2012-03-14 20:26 ` [RFC v5 PATCH 4/4] xfs: Add a new field to fs_quota_stat to get pquota information 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=20120504200032.GV16881@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox