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
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to