linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Chandra Seetharaman <sekharan@us.ibm.com>,
	xfs@oss.sgi.com, linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Steven Whitehouse <swhiteho@redhat.com>, Jan Kara <jack@suse.cz>,
	Abhijith Das <adas@redhat.com>
Subject: Re: [PATCH 1/3] quota: Add a new quotactl command Q_XGETQSTATV
Date: Wed, 21 Aug 2013 15:01:52 +0200	[thread overview]
Message-ID: <20130821130152.GA9709@quack.suse.cz> (raw)
In-Reply-To: <20130821064357.GA8822@infradead.org>

On Tue 20-08-13 23:43:57, Christoph Hellwig wrote:
> Sorry for being late to the game, but I don not like the in-kernel
> interface here at all.  Given that Q_XGETQSTATV is a strict superset
> of Q_XGETQSTAT there is no need for the second method - just always
> fill out the larger in-kernel structure and only copy the smaller
> information to userspace for the Q_XGETSTAT case.  That keeps the amount
> of code required in the implementations of the methods low and follows
> the model used elsewhere in the kernel (e.g. stat and statfs)
  Well, the trouble is with gquota vs pquota - previously we report in
qs_gquota field either group quotas or project quotas depending on what is
turned on. Generic quota code doesn't know this so xfs get_xstatev() would
have to recognize whether it is being called from the old Q_XGETSTAT
quotactl or from the new Q_XGETSTATV quotactl to know where to fill in
project quotas. And at that point you somewhat loose the elegancy of using
one interface - we could set qs_version to some special value so that
.get_xstatev() recognizes this and does the magic but that doesn't seem very
different from the extra call...

Some duplication could be certainly avoided within XFS itself.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2013-08-21 13:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 22:27 [PATCH 0/3] Add a new quotactl command to support 3 quota types in XFS Chandra Seetharaman
2013-08-06 22:27 ` [PATCH 1/3] quota: Add a new quotactl command Q_XGETQSTATV Chandra Seetharaman
2013-08-13 20:42   ` Rich Johnston
2013-08-13 20:50     ` Chandra Seetharaman
2013-08-13 21:22     ` Jan Kara
2013-08-13 22:22       ` Rich Johnston
2013-08-13 22:39       ` Chandra Seetharaman
2013-08-14  9:31         ` Jan Kara
2013-08-21  6:43   ` Christoph Hellwig
2013-08-21 13:01     ` Jan Kara [this message]
2013-08-21 18:12       ` Ben Myers
2013-08-21 18:19         ` Christoph Hellwig
2013-08-21 21:15           ` Chandra Seetharaman
2013-08-29 17:00             ` Chandra Seetharaman
2013-08-29 17:48               ` Ben Myers
2013-08-06 22:27 ` [PATCH 2/3] xfs: Add support for the Q_XGETQSTATV Chandra Seetharaman
2013-08-13 20:42   ` Rich Johnston
2013-08-06 22:27 ` [PATCH 3/3] gfs2: " Chandra Seetharaman
2013-08-13 20:42   ` Rich Johnston
2013-08-20 22:25 ` [PATCH 0/3] Add a new quotactl command to support 3 quota types in XFS Ben Myers
2013-08-21 12:28   ` Steven Whitehouse
2013-08-21 17:44     ` Ben Myers

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=20130821130152.GA9709@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=adas@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sekharan@us.ibm.com \
    --cc=swhiteho@redhat.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;
as well as URLs for NNTP newsgroup(s).