Re: [v6 4/4] ext4: adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux