linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] quota: unify ->get_dqblk
Date: Wed, 5 May 2010 12:20:31 -0400	[thread overview]
Message-ID: <20100505162031.GB21009@infradead.org> (raw)
In-Reply-To: <20100505160052.GE3938@quack.suse.cz>

On Wed, May 05, 2010 at 06:00:53PM +0200, Jan Kara wrote:
> > +static void copy_to_if_dqblk(struct if_dqblk *dst, struct fs_disk_quota *src)
>   Could you move fs_disk_quota declaration from an XFS-specific header to
> a generic one?

The only XFS-specific thing in dqblk_xfs.h is the name.  Feel free to
rename it to whatever better name suits you.

> >  /* Generic routine for getting common part of quota structure */
> > -static void do_get_dqblk(struct dquot *dquot, struct if_dqblk *di)
> > +static void do_get_dqblk(struct dquot *dquot, struct fs_disk_quota *di)
> >  {
> >  	struct mem_dqblk *dm = &dquot->dq_dqb;
> >  
> > +	memset(di, 0, sizeof(*di));
> > +	di->d_version = FS_DQUOT_VERSION;
> > +	di->d_flags = dquot->dq_type == USRQUOTA ?
> > +			XFS_USER_QUOTA : XFS_GROUP_QUOTA;
> > +	di->d_id = dquot->dq_id;
>   XFS_USER_QUOTA and XFS_GROUP_QUOTA looks awkward in the generic code...

I have a patch renaming the last remaining XFS_ identifiers in
dqblk_xfs.h to FS_ like the rest, but as I've just sent a gfs2 patch
that touches code with these identifiers I'll hold it back until the
gfs2 tree is merged.

> >  int vfs_get_dqblk(struct super_block *sb, int type, qid_t id,
> > -		  struct if_dqblk *di)
> > +		  struct fs_disk_quota *di)
> >  {
> >  	struct dquot *dquot;
> >  
> > +	if (!sb_has_quota_active(sb, type))
> > +		return -ESRCH;
> > +
>   dqget() already does this check so you can just remove it....

Ok, fixed for the next version.


  reply	other threads:[~2010-05-05 16:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 10:39 [PATCH 0/3] start the quota unification Christoph Hellwig
2010-05-05 10:39 ` [PATCH 1/3] cifs: drop quota operation stubs Christoph Hellwig
2010-05-05 15:34   ` Jan Kara
2010-05-05 18:57     ` Steve French
2010-05-06 11:47   ` Jeff Layton
2010-05-05 10:39 ` [PATCH 2/3] quota: unify ->get_dqblk Christoph Hellwig
2010-05-05 13:52   ` Steven Whitehouse
2010-05-05 16:18     ` Christoph Hellwig
2010-05-05 16:00   ` Jan Kara
2010-05-05 16:20     ` Christoph Hellwig [this message]
2010-05-06 21:04   ` [PATCH 2/3 v2] " Christoph Hellwig
2010-05-05 10:39 ` [PATCH 3/3] quota: unify ->set_dqblk Christoph Hellwig
2010-05-05 16:09   ` Jan Kara
2010-05-05 16:21     ` Christoph Hellwig
2010-05-06 21:05   ` [PATCH 3/3 v2] " Christoph Hellwig
2010-05-07 16:35 ` [PATCH 4/3] quota: remove sb_has_quota_active in get/set_info Christoph Hellwig
2010-05-11  8:33   ` Jan Kara

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=20100505162031.GB21009@infradead.org \
    --to=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).