lkml.org 
[lkml]   [2023]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [f2fs-dev] [PATCH] f2fs: add f2fs_ioc_[get|set]_extra_attr
From


On 2023/6/1 11:16, Eric Biggers wrote:
> On Mon, May 29, 2023 at 09:35:00AM +0800, Sheng Yong via Linux-f2fs-devel wrote:
>> This patch introduces two ioctls:
>> * f2fs_ioc_get_extra_attr
>> * f2fs_ioc_set_extra_attr
>> to get or modify values in extra attribute area.
>>
>> The argument of these two ioctls is `struct f2fs_extra_attr', which has
>> three members:
>> * field: indicates which field in extra attribute area is handled
>> * attr: value or userspace pointer
>> * attr_size: size of `attr'
>>
>> The `field' member could help extend functionality of these two ioctls
>> without modify or add new interfaces, if more fields are added into
>> extra attributes ares in the feture.
>>
>> Signed-off-by: Sheng Yong <shengyong@oppo.com>
>
> Aren't there enough things called extra or extended attributes already? Besides
> the standard "extended attributes" retrievable with the getxattr() system call,
> there is already the FS_IOC_FSGETXATTR ioctl too.
Hi, Eric,

The name extra_attr is a bit confusing :-(
But f2fs usually extends new features through extra_attr, like compression, inode
chksum. Since this area is easy to extend, new features could also be added here
in the future. To avoid adding new ioctls for new features, these two could help
integrate with all extra_attr related ioctls. And it seems not appropriate to add
new fields or get/set f2fs-only attributes by FS_IOC_FSGETXATTR/FS_IOC_FSGETXATTR.
xattrs could not be accessed through these two, only inline xattr size is allowed
to be modified for an empty file.

thanks,
shengyong

>
> - Eric

\
 
 \ /
  Last update: 2023-06-01 16:39    [W:0.129 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site