linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH v4 0/6] f2fs: add f2fs_ioc_[get|set]_extra_attr
@ 2023-06-12  3:01 Sheng Yong via Linux-f2fs-devel
  2023-06-12  3:01 ` [f2fs-dev] [PATCH v4 1/6] f2fs: add helper to check compression level Sheng Yong via Linux-f2fs-devel
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Sheng Yong via Linux-f2fs-devel @ 2023-06-12  3:01 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: ebiggers, linux-kernel, linux-f2fs-devel

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(-)

-- 
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-06-15 18:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-12  3:01 [f2fs-dev] [PATCH v4 0/6] f2fs: add f2fs_ioc_[get|set]_extra_attr Sheng Yong via Linux-f2fs-devel
2023-06-12  3:01 ` [f2fs-dev] [PATCH v4 1/6] f2fs: add helper to check compression level Sheng Yong via Linux-f2fs-devel
2023-06-12 22:14   ` Jaegeuk Kim
2023-06-13  1:48     ` Chao Yu
2023-06-13  2:28     ` Sheng Yong via Linux-f2fs-devel
2023-06-12  3:01 ` [f2fs-dev] [PATCH v4 2/6] f2fs: cleanup MIN_INLINE_XATTR_SIZE Sheng Yong via Linux-f2fs-devel
2023-06-13  1:48   ` Chao Yu
2023-06-12  3:01 ` [f2fs-dev] [PATCH v4 3/6] f2fs: add helper to get inode chksum from inode page Sheng Yong via Linux-f2fs-devel
2023-06-13  1:52   ` Chao Yu
2023-06-12  3:01 ` [f2fs-dev] [PATCH v4 4/6] f2fs: add f2fs_ioc_get_compress_blocks Sheng Yong via Linux-f2fs-devel
2023-06-13  1:53   ` Chao Yu
2023-06-12  3:01 ` [f2fs-dev] [PATCH v4 5/6] f2fs: add f2fs_ioc_[get|set]_extra_attr Sheng Yong via Linux-f2fs-devel
2023-06-12 15:47   ` Jaegeuk Kim
2023-06-13  1:53     ` Sheng Yong via Linux-f2fs-devel
2023-06-12  3:01 ` [f2fs-dev] [PATCH v4 6/6] f2fs: access compression level and flags by extra attr ioctls Sheng Yong via Linux-f2fs-devel
2023-06-15 18:00 ` [f2fs-dev] [PATCH v4 0/6] f2fs: add f2fs_ioc_[get|set]_extra_attr patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).