linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
To: Andreas Dilger <adilger-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
Cc: Li Xi <pkuelelixi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	tytso-3s7WtUTddSA@public.gmane.org,
	jack-AlSwsSmVLrQ@public.gmane.org,
	viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
	hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	dmonakhov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org
Subject: Re: [v13 2/5] ext4: adds project ID support
Date: Tue, 21 Apr 2015 14:19:46 +0200	[thread overview]
Message-ID: <20150421121946.GH24278@quack.suse.cz> (raw)
In-Reply-To: <60E980ED-C4CF-4558-B0A2-5E5671388BE1-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>

On Mon 20-04-15 17:25:51, Andreas Dilger wrote:
> On Apr 19, 2015, at 7:39 PM, Li Xi <pkuelelixi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > 
> > This patch adds a new internal field of ext4 inode to save project
> > identifier. Also a new flag EXT4_INODE_PROJINHERIT is added for
> > inheriting project ID from parent directory.
> > 
> 
> > @@ -3930,12 +3939,18 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
> > 	inode->i_mode = le16_to_cpu(raw_inode->i_mode);
> > 	i_uid = (uid_t)le16_to_cpu(raw_inode->i_uid_low);
> > 	i_gid = (gid_t)le16_to_cpu(raw_inode->i_gid_low);
> > +	if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_PROJECT))
> > +		i_projid = (projid_t)le32_to_cpu(raw_inode->i_projid);
> 
> This needs to check if EXT4_PROJID_INHERIT_FL is set, and if i_projid
> fits in i_extra_isize, otherwise it could be accessing a garbage value
> beyond i_extra_isize.
  We don't need to check EXT4_PROJID_INHERIT_FL. That is completely
independent of whether project ID is stored or not. We should check whether
project ID fits into the inode in this place, that is correct.
	
								Honza
-- 
Jan Kara <jack-AlSwsSmVLrQ@public.gmane.org>
SUSE Labs, CR

  parent reply	other threads:[~2015-04-21 12:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20  1:39 [v13 0/5] ext4: add project quota support Li Xi
     [not found] ` <1429493988-16819-1-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2015-04-20  1:39   ` [v13 1/5] vfs: adds general codes to enforces project quota limits Li Xi
     [not found]     ` <1429493988-16819-2-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2015-04-21 11:56       ` Jan Kara
2015-04-20  1:39 ` [v13 2/5] ext4: adds project ID support Li Xi
     [not found]   ` <1429493988-16819-3-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2015-04-20 23:25     ` Andreas Dilger
     [not found]       ` <60E980ED-C4CF-4558-B0A2-5E5671388BE1-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org>
2015-04-21 12:19         ` Jan Kara [this message]
2015-04-20  1:39 ` [v13 3/5] ext4: adds project quota support Li Xi
     [not found]   ` <1429493988-16819-4-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2015-04-20 23:27     ` Andreas Dilger
2015-04-21 12:35       ` Jan Kara
2015-04-22 18:52         ` Li Xi
2015-04-20  1:39 ` [v13 4/5] ext4: adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support Li Xi
2015-04-20 23:33   ` Andreas Dilger
     [not found]   ` <1429493988-16819-5-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2015-04-21 12:52     ` Jan Kara
2015-04-20  1:39 ` [v13 5/5] ext4: cleanup inode flag definitions Li Xi

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=20150421121946.GH24278@quack.suse.cz \
    --to=jack-alswssmvlrq@public.gmane.org \
    --cc=adilger-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org \
    --cc=dmonakhov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    --cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pkuelelixi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tytso-3s7WtUTddSA@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.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).