linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
	fsdevel <linux-fsdevel@vger.kernel.org>,
	Eric Sandeen <sandeen@redhat.com>,
	xfs@oss.sgi.com
Subject: Re: [PATCH 0/4] quota: add new quotactl Q_XGETQUOTA2
Date: Mon, 11 Jan 2016 17:28:07 +0100	[thread overview]
Message-ID: <20160111162807.GK6262@quack.suse.cz> (raw)
In-Reply-To: <5693D33A.5090307@sandeen.net>

On Mon 11-01-16 10:07:22, Eric Sandeen wrote:
> On 1/11/16 7:26 AM, Jan Kara wrote:
> > On Fri 08-01-16 23:26:00, Christoph Hellwig wrote:
> >> On Fri, Jan 08, 2016 at 10:56:12AM -0600, Eric Sandeen wrote:
> >>> This adds a new quotactl, Q_XGETQUOTA2.
> >>>
> >>> Q_XGETQUOTA2 is exactly like Q_XGETQUOTA, except that it will
> >>> return quota information for the id equal to or greater than
> >>> the id requested.  In other words, if the specified id has
> >>> no quota, the command will return quota information for the
> >>> next higher id which does have a quota set.  If no higher id
> >>> has an active quota, -ESRCH is returned.
> >>
> >> Please add a flags argument to Q_XGETQUOTA2, and then make the
> >> new behavior the first flag.  Keep Q_XGETQUOTA behavior for the
> >> flag-less case.  That way we get future etensibility for free.
> > 
> > So this is what I wanted to suggest at first as well. What I somewhat
> > dislike is that 'addr' must now point to something like:
> > 
> > struct getquota_args {
> > 	__u64 flags;
> > 	struct fs_disk_quota ret;
> > };
> 
> Ok...
> 
> > which is not as nice as passing pointer to fs_disk_quota directly. But
> > probably still OK. So I agree with the flags idea.
> 
> I understand that flags are for future-proofing, for possibly-not-yet-imagined
> scenarios, but on the other hand, I wonder how many different flavors of
> "get me a disk quota" we really expect to have?
> 
> > Another issue is that OCFS2 and ext4 with quota in hidden inodes would need
> > call with these capabilities as well (they have the same problem as xfs).
> > For reporting VFS quota we use bytes for space (since some filesystems need
> > it) and we don't need RT fields (easy so zero-fill) and warning fields
> > (there zeros may be confusing). So we would need something like struct
> > qc_dqblk (currently only internal) extended with ID and maybe flags field
> > XFS is using to return quota type which can contain all the information and
> > tell which info is actually valid as return structure.
> 
> Hohum, yeah - I forgot that ext4 has (can have?) a hidden quota inode.
> And I didn't know about OCFS2.
> 
> And TBH I did the xfs-specific one because it was trivial to extend, with the
> id already in the returned quota struct.
> 
> So ok, it sounds like this needs a more significant overhaul at the vfs
> quota level...

Actually, what I want from you is just an interface which is usable for VFS
quotas as well since I'd like to avoid adding GETQUOTA2 quotactl shortly
after XGETQUOTA2 :). Using id as a cooking is fine for VFS quotas as well so
that part can stay.

I can have a look at implementing the new handler for VFS quota format(s)
which should be pretty easy once the interface part is merged or you can
do it if you're interested in learning more about quota internals.

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

  reply	other threads:[~2016-01-11 16:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 16:56 [PATCH 0/4] quota: add new quotactl Q_XGETQUOTA2 Eric Sandeen
2016-01-08 16:57 ` [PATCH 1/4] " Eric Sandeen
2016-01-08 16:57 ` [PATCH 2/4] xfs: get quota inode from mp & flags rather than dqp Eric Sandeen
2016-01-08 16:58 ` [PATCH 3/4] xfs: Factor xfs_seek_hole_data into helper Eric Sandeen
2016-01-11 15:57   ` Jan Kara
2016-01-11 16:01   ` [PATCH 3/4 V3] " Eric Sandeen
2016-01-08 16:59 ` [PATCH 4/4] xfs: wire up Q_XGETQUOTA2 / get_dqblk2 Eric Sandeen
2016-01-08 18:36 ` [PATCH] linux-quota: wire Q_XGETQUOTA2 into generic repquota Eric Sandeen
2016-01-09  7:26 ` [PATCH 0/4] quota: add new quotactl Q_XGETQUOTA2 Christoph Hellwig
2016-01-11 13:26   ` Jan Kara
2016-01-11 16:07     ` Eric Sandeen
2016-01-11 16:28       ` Jan Kara [this message]
2016-01-13 22:40         ` Eric Sandeen
2016-01-15  9:35           ` Jan Kara
2016-01-15 17:31             ` Eric Sandeen
2016-01-15 19:38               ` Eric Sandeen
2016-01-18 10:33               ` Jan Kara
2016-01-18 11:00                 ` Christoph Hellwig
2016-01-18 15:18                 ` Eric Sandeen
2016-01-18 15:40                   ` Jan Kara
2016-01-15 22:50             ` 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=20160111162807.GK6262@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    --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).