From: Jan Kara <jack@suse.cz>
To: Li Xi <pkuelelixi@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-api@vger.kernel.org, tytso@mit.edu, adilger@dilger.ca,
jack@suse.cz, viro@zeniv.linux.org.uk, hch@infradead.org,
dmonakhov@openvz.org
Subject: Re: [v5 1/5] Adds general codes to enforces project quota limits
Date: Thu, 30 Oct 2014 17:05:43 +0100 [thread overview]
Message-ID: <20141030160543.GG28444@quack.suse.cz> (raw)
In-Reply-To: <1414300973-1118-2-git-send-email-lixi@ddn.com>
On Sun 26-10-14 13:22:49, Li Xi wrote:
> This patch adds support for a new quota type PRJQUOTA for project quota
> enforcement. Also a new method get_projid() is added into dquot_operations
> structure.
>
> Signed-off-by: Li Xi <lixi@ddn.com>
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
...
> @@ -72,6 +76,8 @@ static int quota_quotaon(struct super_block *sb, int type, int cmd, qid_t id,
> return sb->s_qcop->quota_on_meta(sb, type, id);
> if (IS_ERR(path))
> return PTR_ERR(path);
> + if (type == PRJQUOTA && sb->dq_op->get_projid == NULL)
> + return -EOPNOTSUPP;
> return sb->s_qcop->quota_on(sb, type, id, path);
> }
Checking for ->get_projid() in quota_quotaon() isn't necessary. This will
be already handled by allowed_qtype bitmask in my patches. But you could
add a test in vfs_load_quota_inode() just after ->quota_write and
->quota_read tests. It will be mostly a safety check but I think it's
worthwhile.
Otherwise the patch looks fine to me.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2014-10-30 16:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-26 5:22 [v5 0/5] quota: add project quota support for ext4 Li Xi
[not found] ` <1414300973-1118-1-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-10-26 5:22 ` [v5 1/5] Adds general codes to enforces project quota limits Li Xi
2014-10-30 16:05 ` Jan Kara [this message]
2014-10-26 5:22 ` [v5 2/5] Adds project ID support for ext4 Li Xi
[not found] ` <1414300973-1118-3-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-10-30 16:18 ` Jan Kara
2014-10-26 5:22 ` [v5 3/5] Adds project quota " Li Xi
[not found] ` <1414300973-1118-4-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-10-30 16:50 ` Jan Kara
2014-10-26 5:22 ` [v5 4/5] Adds ioctl interface support for ext4 project Li Xi
[not found] ` <1414300973-1118-5-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-10-26 7:49 ` Arnd Bergmann
2014-10-26 21:57 ` Dave Chinner
2014-10-30 16:51 ` Jan Kara
2014-10-26 5:22 ` [v5 5/5] Adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support for ext4 Li Xi
[not found] ` <1414300973-1118-6-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-10-26 21:56 ` Dave Chinner
2014-10-27 1:09 ` Li Xi
[not found] ` <CAPTn0cAAbfnqYgnCEESZeY8XaK=DSGB673Srn_TVYxETG89_OQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-27 22:40 ` 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=20141030160543.GG28444@quack.suse.cz \
--to=jack@suse.cz \
--cc=adilger@dilger.ca \
--cc=dmonakhov@openvz.org \
--cc=hch@infradead.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=pkuelelixi@gmail.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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).