Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jingbo Xu <jefflexu@linux.alibaba.com>
To: hsiangkao@linux.alibaba.com, linux-erofs@lists.ozlabs.org
Subject: [PATCH v6 0/3] erofs-utils: introduce xattr name bloom filter
Date: Tue, 29 Aug 2023 20:41:24 +0800	[thread overview]
Message-ID: <20230829124127.36719-1-jefflexu@linux.alibaba.com> (raw)

changes since v5:
- patch 1: update distribution license
- patch 3: rebase to the latest -dev branch

changes since v4:
- patch 3: the feature is refactored and implemented in a more cohesive
  way, that is, the hashbit is calculated in erofs_export_xattr_ibody().
  For xattr_item in the long xattr name prefix style, reconstruct the
  full xattr name first, then derive the corresponding predefined short
  name prefix and finally calculate the hashbit.

changes since v3:
- patch 3: "-Exattr-name-filter" option rather than "--xattr-filter"
  option is newly introduced to enable this feature (Gao Xiang)

changes since v2:
- patch 2: introduce xattr_filter_reserved in on-disk superblock;
  remove EROFS_XATTR_FILTER_MASK
- patch 3: xattr_filter_reserved is always initialized to 0 by default


changes since RFC:
- the number of hash functions is 1, and now it's implemented as:
    xxh32(name, strlen(name), EROFS_XATTR_FILTER_SEED + index),
  where the constant magic number EROFS_XATTR_FILTER_SEED [*] is used to
  give a better spread for the mapping. (Alexander Larsson)
- fix the value of EROFS_FEATURE_COMPAT_XATTR_FILTER; rename
  EROFS_XATTR_BLOOM_* to EROFS_XATTR_FILTER_* (Gao Xiang)


RFC: https://lore.kernel.org/all/20230621083939.128961-1-jefflexu@linux.alibaba.com/
v2: https://lore.kernel.org/all/20230705071017.104130-1-jefflexu@linux.alibaba.com/
v3: https://lore.kernel.org/all/20230712121331.99671-1-jefflexu@linux.alibaba.com/
v4: https://lore.kernel.org/all/20230714025330.42950-1-jefflexu@linux.alibaba.com/
v5: https://lore.kernel.org/all/20230722042414.126630-1-jefflexu@linux.alibaba.com/

The xattr bloom filter feature is used to boost the negative xattr
lookup.

Refer to the kernel patch set [*] for more details.

[*] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fd73a4395d47


Jingbo Xu (3):
  erofs-utils: add xxh32 library
  erofs-utils: update on-disk format for xattr name filter
  erofs-utils: mkfs: enable xattr name filter

 include/erofs/config.h   |   1 +
 include/erofs/internal.h |   1 +
 include/erofs/xxhash.h   |  72 ++++++++++++++++++++++
 include/erofs_fs.h       |  12 +++-
 lib/Makefile.am          |   3 +-
 lib/xattr.c              |  63 ++++++++++++++++++++
 lib/xxhash.c             | 125 +++++++++++++++++++++++++++++++++++++++
 mkfs/main.c              |   7 +++
 8 files changed, 281 insertions(+), 3 deletions(-)
 create mode 100644 include/erofs/xxhash.h
 create mode 100644 lib/xxhash.c

-- 
2.19.1.6.gb485710b


             reply	other threads:[~2023-08-29 12:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 12:41 Jingbo Xu [this message]
2023-08-29 12:41 ` [PATCH v6 1/3] erofs-utils: add xxh32 library Jingbo Xu
2023-08-29 12:44   ` Gao Xiang
2023-08-29 14:14     ` Jingbo Xu
2023-08-29 12:41 ` [PATCH v6 2/3] erofs-utils: update on-disk format for xattr name filter Jingbo Xu
2023-08-29 12:49   ` Gao Xiang
2023-08-29 14:19     ` Jingbo Xu
2023-08-29 12:41 ` [PATCH v6 3/3] erofs-utils: mkfs: enable " Jingbo Xu
2023-08-29 12:53   ` Gao Xiang
2023-08-29 14:20     ` Jingbo Xu

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=20230829124127.36719-1-jefflexu@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.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