From: Sheng Yong <shengyong@oppo.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: jaegeuk@kernel.org, chao@kernel.org,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: add f2fs_ioc_[get|set]_extra_attr
Date: Thu, 1 Jun 2023 22:37:24 +0800 [thread overview]
Message-ID: <d156c532-3531-c1ca-7d9f-fd77df47242a@oppo.com> (raw)
In-Reply-To: <20230601031658.GA728@quark.localdomain>
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
prev parent reply other threads:[~2023-06-01 14:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 1:35 Sheng Yong
2023-05-29 1:35 ` [PATCH 1/2] f2fs_io: add [get|set_attr] to access inode extra attributes Sheng Yong
2023-06-01 3:13 ` Chao Yu
2023-05-29 1:35 ` [PATCH 2/2] f2fs_io: convert compression ioctls to [get|set]_attr Sheng Yong
2023-05-29 6:10 ` [PATCH] f2fs: add f2fs_ioc_[get|set]_extra_attr kernel test robot
2023-05-29 6:20 ` kernel test robot
2023-05-29 8:19 ` kernel test robot
2023-05-30 6:34 ` [PATCH v2] " Sheng Yong
2023-06-01 3:06 ` Chao Yu
2023-06-04 2:28 ` [PATCH v3] " Sheng Yong
2023-06-07 17:09 ` Jaegeuk Kim
2023-06-01 3:16 ` [f2fs-dev] [PATCH] " Eric Biggers
2023-06-01 14:37 ` Sheng Yong [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=d156c532-3531-c1ca-7d9f-fd77df47242a@oppo.com \
--to=shengyong@oppo.com \
--cc=chao@kernel.org \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®