xfs
[Top] [All Lists]

Re: A question in the context of independent pquota

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: A question in the context of independent pquota
From: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Date: Tue, 25 Oct 2011 11:59:12 -0500
Cc: XFS Mailing List <xfs@xxxxxxxxxxx>
In-reply-to: <20111025115428.GC22103@xxxxxxxxxxxxx>
Organization: IBM
References: <1319151746.1959.63.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20111025115428.GC22103@xxxxxxxxxxxxx>
Reply-to: sekharan@xxxxxxxxxx
On Tue, 2011-10-25 at 07:54 -0400, Christoph Hellwig wrote:
> Hi Chandra,
> 
> I don't think there is an easy way to add a field there.  Please
> just add a new Q_XGETQSTAT_2 call that takes the new, larger structure.

Christoph,

I came up with couple of ideas.

- Add a new version FS_QSTAT_VERSION2 (with a value of 2) that uses
  the newer fs_quota_stat
- Start using qs_version in the user space code, with the bigger 
  fs_quota_stat
- Define a macro to check if the given version is a valid one.
- In xfs_qm_scall_getqstat()(kernel), copy in the newer fs_quota_stat
  structure from user space.
  If copy in succeeded, check qs_version. 
     If valid, use the structure relevant to the version.
     If invalid, use structure for the version FS_QSTAT_VERSION.
  If copy in failed,
     use structure for the version FS_QSTAT_VERSION.

I think it should work with the current user space code.

Let me know what you think of it.

Thanks & Regards,

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


<Prev in Thread] Current Thread [Next in Thread>