public inbox for linux-xfs@vger.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: [RFC v6 PATCH 5/5] xfs: Add a new field to fs_quota_stat to get pquota information
Date: Wed, 15 Aug 2012 12:37:42 +1000	[thread overview]
Message-ID: <20120815023742.GU2877@dastard> (raw)
In-Reply-To: <20120720230305.20477.41556.sendpatchset@chandra-lucid.austin.ibm.com>

On Fri, Jul 20, 2012 at 06:03:05PM -0500, Chandra Seetharaman wrote:
> Use separate structure for filling the project quota information
> for the Q_XGETQSTAT quota command.
> 
> Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
> ---
>  fs/xfs/xfs_qm_syscalls.c |   26 +++++++++++++-------------
>  1 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
> index f011cf3..482efc0 100644
> --- a/fs/xfs/xfs_qm_syscalls.c
> +++ b/fs/xfs/xfs_qm_syscalls.c
> @@ -421,7 +421,6 @@ xfs_qm_scall_getqstat(
>  	tempuqip = tempgqip = temppqip = B_FALSE;
>  	memset(out, 0, sizeof(fs_quota_stat_t));
>  
> -	out->qs_version = FS_QSTAT_VERSION;
>  	if (!xfs_sb_version_hasquota(&mp->m_sb)) {
>  		out->qs_uquota.qfs_ino = NULLFSINO;
>  		out->qs_gquota.qfs_ino = NULLFSINO;
> @@ -434,8 +433,6 @@ xfs_qm_scall_getqstat(
>  	out->qs_pad = 0;
>  	out->qs_uquota.qfs_ino = mp->m_sb.sb_uquotino;
>  	out->qs_gquota.qfs_ino = mp->m_sb.sb_gquotino;
> -	if (&out->qs_gquota != &out->qs_pquota)
> -		out->qs_pquota.qfs_ino = mp->m_sb.sb_pquotino;
>  
>  	if (q) {
>  		uip = q->qi_uquotaip;
> @@ -452,11 +449,6 @@ xfs_qm_scall_getqstat(
>  					0, 0, &gip) == 0)
>  			tempgqip = B_TRUE;
>  	}
> -	if (!pip && mp->m_sb.sb_pquotino != NULLFSINO) {
> -		if (xfs_iget(mp, NULL, mp->m_sb.sb_pquotino,
> -					0, 0, &pip) == 0)
> -			temppqip = B_TRUE;
> -	}
>  	if (uip) {
>  		out->qs_uquota.qfs_nblks = uip->i_d.di_nblocks;
>  		out->qs_uquota.qfs_nextents = uip->i_d.di_nextents;
> @@ -469,11 +461,19 @@ xfs_qm_scall_getqstat(
>  		if (tempgqip)
>  			IRELE(gip);
>  	}
> -	if (pip) {
> -		out->qs_pquota.qfs_nblks = pip->i_d.di_nblocks;
> -		out->qs_pquota.qfs_nextents = pip->i_d.di_nextents;
> -		if (temppqip)
> -			IRELE(pip);
> +	if (out->qs_version >= FS_QSTAT_VERSION_2) {
> +		out->qs_pquota.qfs_ino = mp->m_sb.sb_pquotino;
> +		if (!pip && mp->m_sb.sb_pquotino != NULLFSINO) {
> +			if (xfs_iget(mp, NULL, mp->m_sb.sb_pquotino,
> +						0, 0, &pip) == 0)
> +				temppqip = B_TRUE;
> +		}
> +		if (pip) {
> +			out->qs_pquota.qfs_nblks = pip->i_d.di_nblocks;
> +			out->qs_pquota.qfs_nextents = pip->i_d.di_nextents;
> +			if (temppqip)
> +				IRELE(pip);
> +		}

Doesn't this mean that we'll never report project quota for
FS_QSTAT_VERSION structures and the old quota format? i.e. existing
tools with a new kernel won't return the project quota info in the
group quota fields?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2012-08-15  2:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 23:02 [RFC v6 PATCH 0/5] xfs: Allow pquota and gquota to be used together Chandra Seetharaman
2012-07-20 23:02 ` [RFC v6 PATCH 1/5] xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
2012-08-14 22:46   ` Dave Chinner
2012-08-22 22:53     ` Chandra Seetharaman
2012-09-13  7:56       ` Christoph Hellwig
2012-09-13 20:37         ` Chandra Seetharaman
2012-07-20 23:02 ` [RFC v6 PATCH 2/5] xfs: Add pquota fields where gquota is used Chandra Seetharaman
2012-08-15  1:15   ` Dave Chinner
2012-08-22 22:56     ` Chandra Seetharaman
2012-07-20 23:02 ` [RFC v6 PATCH 3/5] xfs: Add pquotaino to on-disk super block Chandra Seetharaman
2012-08-15  2:09   ` Dave Chinner
2012-08-22 23:30     ` Chandra Seetharaman
2012-08-23  0:25       ` Dave Chinner
2012-07-20 23:02 ` [RFC v6 PATCH 4/5] xfs: Add proper versioning support to fs_quota_stat Chandra Seetharaman
2012-08-15  2:32   ` Dave Chinner
2012-08-22 23:32     ` Chandra Seetharaman
2012-07-20 23:03 ` [RFC v6 PATCH 5/5] xfs: Add a new field to fs_quota_stat to get pquota information Chandra Seetharaman
2012-08-15  2:37   ` Dave Chinner [this message]
2012-08-22 23:40     ` 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=20120815023742.GU2877@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox