mbox series

[f2fs-dev,v4,0/6] f2fs: add f2fs_ioc_[get|set]_extra_attr

Message ID 20230612030121.2393541-1-shengyong@oppo.com (mailing list archive)
Headers show
Series f2fs: add f2fs_ioc_[get|set]_extra_attr | expand

Message

Sheng Yong June 12, 2023, 3:01 a.m. UTC
This patchset introduces two ioctls to get or modify values in
f2fs_inode's extra attribute area:
  * f2fs_ioc_get_extra_attr
  * f2fs_ioc_set_extra_attr

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.

In order to reuse existed functions, several helpers are added to:
  * read inode chksum from inode page
  * get compress blocks
  * verify compression level
And, a compress_option v2 is added to access compress level and flags.

Thanks,
shengyong

v4:
  * split into small commits
v3:
  * setting lz4(hc) level correctly
v2:
  * fix compiling error if CONFIG_F2FS_FS_ZSTD is disabled by adding a
    helper f2fs_is_compress_level_valid()
  * fix compiling warning for casting unsinged long long to pointer

Sheng Yong (6):
  f2fs: add helper to check compression level
  f2fs: cleanup MIN_INLINE_XATTR_SIZE
  f2fs: add helper to get inode chksum from inode page
  f2fs: add f2fs_ioc_get_compress_blocks
  f2fs: add f2fs_ioc_[get|set]_extra_attr
  f2fs: access compression level and flags by extra attr ioctls

 fs/f2fs/compress.c        |  31 +++++
 fs/f2fs/f2fs.h            |   4 +
 fs/f2fs/file.c            | 280 ++++++++++++++++++++++++++++++++++++--
 fs/f2fs/inode.c           |  21 +++
 fs/f2fs/super.c           |   6 +-
 fs/f2fs/xattr.h           |   1 +
 include/uapi/linux/f2fs.h |  33 +++++
 7 files changed, 359 insertions(+), 17 deletions(-)

Comments

patchwork-bot+f2fs@kernel.org June 15, 2023, 6 p.m. UTC | #1
Hello:

This series was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Mon, 12 Jun 2023 11:01:15 +0800 you wrote:
> This patchset introduces two ioctls to get or modify values in
> f2fs_inode's extra attribute area:
>   * f2fs_ioc_get_extra_attr
>   * f2fs_ioc_set_extra_attr
> 
> 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'
> 
> [...]

Here is the summary with links:
  - [f2fs-dev,v4,1/6] f2fs: add helper to check compression level
    (no matching commit)
  - [f2fs-dev,v4,2/6] f2fs: cleanup MIN_INLINE_XATTR_SIZE
    https://git.kernel.org/jaegeuk/f2fs/c/4acc6b9d6104
  - [f2fs-dev,v4,3/6] f2fs: add helper to get inode chksum from inode page
    (no matching commit)
  - [f2fs-dev,v4,4/6] f2fs: add f2fs_ioc_get_compress_blocks
    https://git.kernel.org/jaegeuk/f2fs/c/1c5c646596c6
  - [f2fs-dev,v4,5/6] f2fs: add f2fs_ioc_[get|set]_extra_attr
    (no matching commit)
  - [f2fs-dev,v4,6/6] f2fs: access compression level and flags by extra attr ioctls
    (no matching commit)

You are awesome, thank you!