linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
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: [v6 4/4] ext4: adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support
Date: Wed, 12 Nov 2014 08:58:23 +1100	[thread overview]
Message-ID: <20141111215823.GX23575@dastard> (raw)
In-Reply-To: <1415468619-31851-5-git-send-email-lixi@ddn.com>

On Sun, Nov 09, 2014 at 01:43:39AM +0800, Li Xi wrote:
> This patch adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR ioctl interface
> support for ext4. The interface is kept consistent with
> XFS_IOC_FSGETXATTR/XFS_IOC_FSGETXATTR.

I missed somethignthe first time around, and it's to do with
fsx_flags field and what ext4 is putting in it....

> @@ -617,7 +713,45 @@ resizefs_out:
>  	}
>  	case EXT4_IOC_PRECACHE_EXTENTS:
>  		return ext4_ext_precache(inode);
> +	case EXT4_IOC_FSGETXATTR:
> +	{
> +		struct fsxattr fa;
> +
> +		memset(&fa, 0, sizeof(struct fsxattr));
> +
> +		ext4_get_inode_flags(ei);
> +		fa.fsx_xflags = ei->i_flags & EXT4_FL_USER_VISIBLE;

You're putting ext4 inode flags in this field. That's not right -
the flags that are defined for this field are the XFS_XFLAGS_*
fields, and you need to translate between the ext4 flags and the
existing falg definitions. Any falg definitions that don't already
exist that ext4 needs to support need to be added to the XFS_XFLAGS
definitions.

i.e. this is not a field that has flags defined by ext4 - the
flags must be the same across all filesystems that implement it, and
that means ext4 must use the existing definitions where they already
exist.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      parent reply	other threads:[~2014-11-11 21:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-08 17:43 [v6 0/4] ext4: add project quota support Li Xi
     [not found] ` <1415468619-31851-1-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-11-08 17:43   ` [v6 1/4] vfs: adds general codes to enforces project quota limits Li Xi
     [not found]     ` <1415468619-31851-2-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-11-11 20:27       ` Jan Kara
2014-11-08 17:43   ` [v6 2/4] ext4: adds project ID support Li Xi
2014-11-10 22:21     ` Andreas Dilger
     [not found]     ` <1415468619-31851-3-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-11-11  4:26       ` Theodore Ts'o
2014-11-11  7:34         ` Li Xi
2014-11-11 20:23         ` Jan Kara
2014-11-11 20:31     ` Jan Kara
2014-11-08 17:43   ` [v6 3/4] ext4: adds project quota support Li Xi
     [not found]     ` <1415468619-31851-4-git-send-email-lixi-LfVdkaOWEx8@public.gmane.org>
2014-11-11 20:34       ` Jan Kara
2014-11-08 17:43 ` [v6 4/4] ext4: adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support Li Xi
2014-11-10  0:05   ` Dave Chinner
2014-11-11 21:58   ` Dave Chinner [this message]

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=20141111215823.GX23575@dastard \
    --to=david@fromorbit.com \
    --cc=adilger@dilger.ca \
    --cc=dmonakhov@openvz.org \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --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).