On 2025/8/8 15:16, zhaoyifan (H) wrote:
Tested:
- special filename: 'test%^&hidden.txt' 'test space.txt' '测试文件.txt'
- manyfiles (>1000) directory
- path-style obs backend
Tested-by: Yifan Zhao
Thanks, let me merge into -dev now.
Thanks,
Gao Xiang
;
break;
#endif
case 'V':
No, users need to specify `--clean=0` to make it work.
The default mode is still -EOPNOTSUPP.
Thanks,
Gao Xiang
Thanks,
Hongbo
+ err = -EOPNOTSUPP;
+ else
+ err = s3erofs_build_
https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html
Signed-off-by: Gao Xiang
---
mkfs/main.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/mkfs/main.c b/mkfs/main.c
index 07bc3ed..d3bd1cd 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1737,6
the memory.
oh, buf is stack variable, memset is unuse. ;)
I will merge this series to -dev branch today, feel free
to submit any following improvement for this work.
Thanks,
Gao Xiang
https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html
Signed-off-by: Gao Xiang
---
mkfs/main.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/mkfs/main.c b/mkfs/main.c
index 07bc3ed..4e65978 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1737,6
supported;
- The S3 object names and sizes are strictly respected during image
generation.
Co-developed-by: Hongbo Li
Signed-off-by: Hongbo Li
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
v7:
- Fix `NextMarker` omission on the standard AWS S3;
- Add `prefix` support for S3
);
- S3 API calling style (optional);
- S3 API signature version (optional, only V2 is currently supported).
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
lib/liberofs_s3.h | 40
mkfs/main.c | 226 +++---
2 files changed, 234
logic.
Signed-off-by: Yifan Zhao
Reviewed-by: Hongbo Li
Signed-off-by: Gao Xiang
---
mkfs/main.c | 78 ++---
1 file changed, 44 insertions(+), 34 deletions(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index dc2df06..ab27b77 100644
--- a/mkfs/main.c
+++ b
igned-off-by: Gao Xiang
---
configure.ac | 129 ++-
lib/Makefile.am | 1 +
mkfs/Makefile.am | 3 +-
3 files changed, 131 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index da6ae48..7769ac9 100644
--- a/configure.ac
Fix incorrect shift order when combining the 48-bit block count.
Fixes: 2e1473d5195f ("erofs: implement 48-bit block addressing for unencoded
inodes")
Signed-off-by: Gao Xiang
---
fs/erofs/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/erofs/su
supported;
- The S3 object names and sizes are strictly respected during image
generation.
Co-developed-by: Hongbo Li
Signed-off-by: Hongbo Li
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
v6:
- code styling fixes;
- support nanosecond timestamps.
lib/Makefile.am | 3 +
lib
igned-off-by: Gao Xiang
---
configure.ac | 129 ++-
lib/Makefile.am | 1 +
mkfs/Makefile.am | 3 +-
3 files changed, 131 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index da6ae48..7769ac9 100644
--- a/configure.ac
);
- S3 API calling style (optional);
- S3 API signature version (optional, only V2 is currently supported).
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
lib/liberofs_s3.h | 40
mkfs/main.c | 226 +++---
2 files changed, 234
logic.
Signed-off-by: Yifan Zhao
Reviewed-by: Hongbo Li
Signed-off-by: Gao Xiang
---
v6: add Hongbo's RVB tag.
mkfs/main.c | 78 ++---
1 file changed, 44 insertions(+), 34 deletions(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index dc2df06..ab27
On 2025/8/7 11:43, Hongbo Li wrote:
Hi Xiang,
On 2025/8/7 11:08, Gao Xiang wrote:
From: Yifan Zhao
It introduces configuration options for the upcoming experimental S3
support, including configuration parsing and `passwd_file` reading
logic.
Users can specify the following options
);
- S3 API calling style (optional);
- S3 API signature version (optional, only V2 is currently supported).
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
lib/liberofs_s3.h | 40
mkfs/main.c | 226 +++---
2 files changed, 234
supported;
- The S3 object names and sizes are strictly respected during image
generation.
Co-Developed-by: Hongbo Li
Signed-off-by: Hongbo Li
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
lib/Makefile.am | 3 +
lib/liberofs_s3.h | 2 +
lib/remotes/s3.c | 622
igned-off-by: Gao Xiang
---
configure.ac | 129 ++-
lib/Makefile.am | 1 +
mkfs/Makefile.am | 3 +-
3 files changed, 131 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index da6ae48..7769ac9 100644
--- a/configure.ac
logic.
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
mkfs/main.c | 78 ++---
1 file changed, 44 insertions(+), 34 deletions(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index dc2df06..ab27b77 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -244,7 +
save metadata space:
$ mkfs.erofs -zlzma -C1048576 -m4096:lz4hc,12 foo.erofs foo
Or
$ mkfs.erofs -zlzma:lz4hc,12 -C1048576 -m4096:1 foo.erofs foo
will compress metadata in 4096-byte pclusters using LZ4HC level 12.
Signed-off-by: Gao Xiang
---
change since v2:
- Assign EROFS_NID_UNALLOCATED
logic.
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
mkfs/main.c | 78 ++---
1 file changed, 44 insertions(+), 34 deletions(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index dc2df06..ab27b77 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -244,7 +
supported;
- The S3 object names and sizes are strictly respected during image
generation.
Co-Developed-by: Hongbo Li
Signed-off-by: Hongbo Li
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
lib/Makefile.am | 3 +
lib/liberofs_s3.h | 2 +
lib/remotes/s3.c | 621
);
- S3 API calling style (optional);
- S3 API signature version (optional, only V2 is currently supported).
Signed-off-by: Yifan Zhao
Signed-off-by: Gao Xiang
---
lib/liberofs_s3.h | 40 +
mkfs/main.c | 218 --
2 files changed, 229
igned-off-by: Gao Xiang
---
configure.ac | 129 ++-
lib/Makefile.am | 1 +
mkfs/Makefile.am | 3 +-
3 files changed, 131 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index da6ae48..7769ac9 100644
--- a/configure.ac
Allow users to identify the minimum supported upstream kernel version.
Signed-off-by: Gao Xiang
---
dump/main.c | 52 +---
1 file changed, 33 insertions(+), 19 deletions(-)
diff --git a/dump/main.c b/dump/main.c
index 38cc8a2..0388830 100644
erofs_dev_read() will fill with zeroes so this issue has no functional
impact, but this behavior will be changed.
Fixes: f44043561491 ("erofs-utils: introduce fsck.erofs")
Signed-off-by: Gao Xiang
---
fsck/main.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
di
save metadata space:
$ mkfs.erofs -zlzma -C1048576 -m4096:lz4hc,12 foo.erofs foo
Or
$ mkfs.erofs -zlzma:lz4hc,12 -C1048576 -m4096:1 foo.erofs foo
will compress metadata in 4096-byte pclusters using LZ4HC level 12.
Signed-off-by: Gao Xiang
---
include/erofs/blobchunk.h | 3 +-
include
Source kernel commit: 3f59153f08cc7ab3d6686f6ee1960232fd0426d3
Source kernel commit: c1fed66045986c0f0153912a87b0de511f8781a7
Signed-off-by: Gao Xiang
---
v1:
https://lore.kernel.org/r/20250718065419.3338307-10-hsiang...@linux.alibaba.com
changes since v1:
- Fill up the final commit ids
Fixes: a43529e6c912 ("erofs-utils: fuse: kernel caching for readdir")
Signed-off-by: Gao Xiang
---
configure.ac | 5 +
fuse/main.c | 4
2 files changed, 9 insertions(+)
diff --git a/configure.ac b/configure.ac
index 2d42b1f..da6ae48 100644
--- a/configure.ac
+++ b/co
, expected: 0
[2]
https://lore.kernel.org/r/58b661d0-0ebb-4b45-a10d-c5927fb791cd@paulmck-laptop
Signed-off-by: Junli Liu
This version seems applicable to me:
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
r/58b661d0-0ebb-4b45-a10d-c5927fb791cd@paulmck-laptop
Since "Link:" tag mainly refers to the your current patch
in the lore...
Thanks,
Gao Xiang
Signed-off-by: Junli Liu
---
fs/erofs/zdata.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/fs/erofs/zd
() || rcu_read_lock_any_held()) {
+
+ if (z_erofs_in_atomic()) {
Please avoid the unnecessary new line in the next version.
Thanks,
Gao XIang
on that device will be inaccessible.
Signed-off-by: Yuezhang Mo
Reviewed-by: Friendy Su
Reviewed-by: Jacky Cao
Reviewed-by: Daniel Palmer
Still looks good to me, will apply after -rc1 is out:
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
On 2025/8/1 17:10, Hongbo Li wrote:
On 2025/8/1 16:37, Gao Xiang wrote:
Hi Hongbo,
On 2025/8/1 16:31, Hongbo Li wrote:
...
+#ifdef HAVE_S3
HAVE_S3 is a bit odd, how about using
S3_ENABLED (like LZ4_ENABLED?)
+ " --s3=X generate an index-only image fr
s not needed in this patch,
maybe a follow-up patch.)
Also even I agree it's useful for security purposes,
it's still useful to have an _alternative_ way to
pass in plain ak/sk if possible.
`passwd_file` makes sense to me now since s3fs-fuse
uses this name too!
Thanks,
Gao Xiang
[1] h
easy_setopt(easy_curl, CURLOPT_FOLLOWLOCATION, 1L);
+ curl_easy_setopt(easy_curl, CURLOPT_TIMEOUT, 30L);
+
+ xmlInitParser();
+
+ return ret;
+}
+
+static void s3erofs_global_exit(void)
+{
+ if (!easy_curl)
+ return;
+
+ xmlCleanupParser();
+
+ curl_easy_cleanup(easy_curl);
+ easy_curl = NULL;
+
+ curl_global_cleanup();
+}
+
+int s3erofs_build_trees(struct erofs_inode *root, struct erofs_s3 *s3cfg)
+{
+ struct erofs_sb_info *sbi = root->sbi;
+ struct s3erofs_object_iterator *iter;
+ struct s3erofs_object_info *obj;
+ struct erofs_dentry *d;
+ struct erofs_inode *inode;
+ struct stat st;
+ bool dumb;
+ int ret = 0;
+
+ st.st_uid = getuid();
+ st.st_gid = getgid();
+
+ /* XXX */
+ st.st_mtime = sbi->epoch;
st.st_mtime = sbi->epoch + sbi->build_time?
build_time can be specified by users too.
Thanks,
Gao Xiang
headerball=file data is
omited in the source stream)\n"
@@ -247,6 +257,10 @@ static struct erofs_tarfile erofstar = {
static bool incremental_mode;
static u8 metabox_algorithmid;
+#ifdef HAVE_S3
+static struct erofs_s3 s3cfg;
+#endif
+
enum {
EROFS_MKFS_DATA_IMPORT_DEFAULT,
EROFS_MKFS_DATA_IMPORT_FULLDATA,
@@ -257,6 +271,9 @@ enum {
enum {
EROFS_MKFS_SOURCE_DEFAULT,
EROFS_MKFS_SOURCE_LOCALDIR,
Thanks,
Gao Xiang
sers disable any library,
it should fail.
I think why it should behave as this, because libcurl
openssl and libxml can be used for other use cases
(e.g. oci registry support), users can always link
these libs
Thanks,
Gao Xiang
...so that only substrings need to be compared.
It can still be further improved (e.g., by generating a singly linked
list first); any contributions are welcome!
Signed-off-by: Gao Xiang
---
include/erofs/list.h | 5 ++
lib/inode.c | 111
...so that only substrings need to be compared.
As a follow-up, need to add a fallback to a trivial comparison and
sort method when the total number of strings is small.
Signed-off-by: Gao Xiang
---
change since v1:
- just reset step as one byte.
lib/inode.c | 84
*/
+/*
+ * Copyright (C) 2025 HUAWEI, Inc.
+ * http://www.huawei.com/
+ * Created by Yifan Zhao
+ */
+#ifndef __EROFS_S3_H
+#define __EROFS_S3_H
+
+#endif
This file is empty in this patch, so it would be better
to add in the following patch.
Thanks,
Gao Xiang
...so that only substrings need to be compared.
As a follow-up, need to add a fallback to a trivial sort and comparison
method when the total number of strings is small.
Signed-off-by: Gao Xiang
---
change since v1:
- get rid of unneeded `u32 count[2]`.
lib/inode.c | 86
It's also used for the upcoming sort optimization.
Signed-off-by: Gao Xiang
---
lib/inode.c | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/lib/inode.c b/lib/inode.c
index cbce712b..59031144 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -2
... and defer insertion of `.` and `..` entries when preparing
directory inodes.
Signed-off-by: Gao Xiang
---
include/erofs/inode.h | 1 -
lib/inode.c | 52 +--
lib/rebuild.c | 4 ++--
lib/tar.c | 4 +---
4 files changed
...so that only substrings need to be compared.
As a follow-up, need to add a fallback to a trivial sort and comparison
method when the total number of strings is small.
Signed-off-by: Gao Xiang
---
lib/inode.c | 88 -
1 file changed, 60
ortunately Kconfig cannot be changed easily to detect this
automatically, as it cannot distinguish between a "bool" symbol
representing a configurable option in a module, and a driver that cannot
be a module.
---
Thanks, it looks good to me, will upstream in this cycle:
Reviewed-by: Gao
namespace not allowed");
I'm fine with either way, but if we follow ext2/ext4, erofs_err()
is needed too although I don't think the fallback should be
identified as errors...
Thanks,
Gao Xiang
X_ALWAYS) && sbi->blkszbits != PAGE_SHIFT) {
+ errorfc(fc, "unsupported blocksize for DAX");
How about using the info log? Can we consider using infofc in this case?
I think you suggestion sounds better, but how about
sending to the original author?
Thanks,
Gao Xiang
data on that device will be inaccessible.
Signed-off-by: Yuezhang Mo
Reviewed-by: Friendy Su
Reviewed-by: Jacky Cao
Reviewed-by: Daniel Palmer
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
merge conflict is observed.
[1] https://issues.redhat.com/browse/RHEL-75783
Thanks,
Gao Xiang
The following changes since commit 89be9a83ccf1f88522317ce02f854f30d6115c41:
Linux 6.16-rc7 (2025-07-20 15:18:33 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kerne
the
following char of `(` in the line above.
Also if it's possible, please remove the unnecessary comment
("/* handle multiple devices */") above erofs_scan_devices()
together since:
- it was obvious and it might be not inaccurrate;
- it now handles some primary device stuff too.
Thanks,
Gao XIang
nux.alibaba.com
Signed-off-by: Gao Xiang
---
fs/erofs/decompressor.c | 6 ++
fs/erofs/zdata.c| 32 +++-
2 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index b1746215efe6..e524c0b432f3 100644
ng in practice.
Signed-off-by: Gao Xiang
Reviewed-by: Yue Hu
Reviewed-by: Chao Yu
Link: https://lore.kernel.org/r/20230627161240.331-2-hsiang...@linux.alibaba.com
Signed-off-by: Gao Xiang
---
fs/erofs/decompressor.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
diff --
commit 10656f9ca60ed85f4cfc06bcbe1f240ee310fa8c upstream.
Such debug messages are rarely used now. Let's get rid of these,
and revert locally if they are needed for debugging.
Signed-off-by: Gao Xiang
Reviewed-by: Chao Yu
Link:
https://lore.kernel.org/r/20230414083027.12307-1-h
ue Hu
Reviewed-by: Jingbo Xu
Reviewed-by: Chao Yu
Signed-off-by: Gao Xiang
---
fs/erofs/dir.c | 17 -
1 file changed, 17 deletions(-)
diff --git a/fs/erofs/dir.c b/fs/erofs/dir.c
index 966a88cc529e..963bbed0b699 100644
--- a/fs/erofs/dir.c
+++ b/fs/erofs/dir.c
@@ -6,21
commit 9a05c6a8bc26138d34e87b39e6a815603bc2a66c upstream.
It can be folded into z_erofs_onlinepage_endio() to simplify the code.
Reviewed-by: Yue Hu
Reviewed-by: Chao Yu
Signed-off-by: Gao Xiang
Link:
https://lore.kernel.org/r/20230817082813.81180-5-hsiang...@linux.alibaba.com
---
fs/erofs
6.6.y fix:
https://lore.kernel.org/r/20250722094449.2950654-1-hsiang...@linux.alibaba.com
Hi Jan & Stefan,
Please help confirm this 6.1 fix backport if possible too.
Thanks,
Gao Xiang
Gao Xiang (5):
erofs: get rid of debug_one_dentry()
erofs: sunset erofs_dbg()
erofs:
nux.alibaba.com
Signed-off-by: Gao Xiang
---
Hi Jan & Stefan,
Please help confirm this 6.6 fix backport if possible.
Thanks,
Gao Xiang
fs/erofs/decompressor.c | 6 ++
fs/erofs/zdata.c| 32 +++-
2 files changed, 21 insertions(+), 17 deletions(-)
di
port.
I checked this just now. This warning is due to another
helper erofs_inode_in_metabox().
I've fixed it up and just push it out but not sure if
it will catch up with the today's next (20250722).
Thanks,
Gao Xiang
-disk NIDs because of non-LTS 32-bit application compatibility.
Co-developed-by: Gao Xiang
Signed-off-by: Bo Liu
Acked-by: Chao Yu
Signed-off-by: Gao Xiang
---
change since v6:
- fix i386 build warning:
https://lore.kernel.org/r/b555f01c-4e9e-4b42-aa5a-2d35ef9c1...@infradead.org
On 2025/7/21 19:36, Qu Wenruo wrote:
在 2025/7/21 19:55, Jan Kara 写道:
On Mon 21-07-25 11:14:02, Gao Xiang wrote:
Hi Barry,
On 2025/7/21 09:02, Barry Song wrote:
On Wed, Jul 16, 2025 at 8:28 AM Gao Xiang wrote:
[...]
Given the difficulty of allocating large folios, it's always a
Hi Jan,
On 2025/7/21 18:25, Jan Kara wrote:
On Mon 21-07-25 11:14:02, Gao Xiang wrote:
Hi Barry,
On 2025/7/21 09:02, Barry Song wrote:
On Wed, Jul 16, 2025 at 8:28 AM Gao Xiang wrote:
...
... high-order folios can cause side effects on embedded devices
like routers and IoT devices
Hi Barry,
On 2025/7/21 09:02, Barry Song wrote:
On Wed, Jul 16, 2025 at 8:28 AM Gao Xiang wrote:
...
... high-order folios can cause side effects on embedded devices
like routers and IoT devices, which still have MiBs of memory (and I
believe this won't change due to their use
n large directory */
+ if (ra_pages) {
+ pgoff_t idx = DIV_ROUND_UP(ctx->pos, PAGE_SIZE);
Can we use DIV_ROUND_UP_POW2 here too? If it's okay,
I will update the patch manually when applied.
Otherwise it looks good to me,
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
There should be enough space to generate a new DEFLATE block with an
end-of-block symbol, which requires at least 10 bits for BTYPE 01.
Fixes: 861037f4fc15 ("erofs-utils: add a built-in DEFLATE compressor")
Signed-off-by: Gao Xiang
---
lib/kite_defla
pport DEFLATE decompression by using Intel QAT")
Signed-off-by: Bo Liu
Reviewed-by: Gao Xiang
change since v3:
- change Kconfg to select CRYPTO and CRYPTO_DEFLATE
These two lines should be moved under the line ``, since
it shouldn't be part of the commit message, but I'
Source kernel commit: c521e3ad6cc980df6f3bdd2616808ecb973af880
Signed-off-by: Gao Xiang
---
lib/namei.c | 78 ++---
1 file changed, 56 insertions(+), 22 deletions(-)
diff --git a/lib/namei.c b/lib/namei.c
index d6013e5c..c3ddd590 100644
--- a/lib
Now erofs_pread() is simply a wrapper around erofs_io_pread(), and
erofs_iopen() is used to obtain a virtual file for erofs_pread().
Signed-off-by: Gao Xiang
---
dump/main.c | 10 +++--
fsck/main.c | 7 +-
fuse/main.c | 23
Source kernel commit:
Source kernel commit:
Signed-off-by: Gao Xiang
---
dump/main.c | 10 +-
fsck/main.c | 25 ++-
include/erofs/internal.h | 19
Source kernel commit: 09c543798c3cde19aae575a0f76d5fc7c130ff18
Signed-off-by: Gao Xiang
---
dump/main.c | 2 +-
fsck/main.c | 2 +-
include/erofs/internal.h | 3 +-
lib/data.c | 4 +-
lib/fragments.c | 4 +-
lib/rebuild.c| 2
Source kernel commit: fdf80a4793021c2f27953b3075f401a497519ba4
Source kernel commit: 469ad583c1293f5d9f45183050b3beeb4a8c3475
Source kernel commit: e09815446d6944fc5590a6e5f15dd51697202441
Signed-off-by: Gao Xiang
---
include/erofs/internal.h | 14 ++
lib/data.c | 36
.. Need more library work for ztailpacking.
Fixes: f978245e9da8 ("erofs-utils: support encoded extents")
Signed-off-by: Gao Xiang
---
lib/compress.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/compress.c b/lib/compress.c
index a57bb6a3..22fb5d6d 100644
save metadata space:
$ mkfs.erofs -zlzma -C1048576 -m4096:lz4hc,12 foo.erofs foo
Or
$ mkfs.erofs -zlzma:lz4hc,12 -C1048576 -m4096:1 foo.erofs foo
will compress metadata in 4096-byte pclusters using LZ4HC level 12.
Signed-off-by: Gao Xiang
---
include/erofs/blobchunk.h | 3 +-
include
.. Avoid erofs_dev_write() and use the bdev virtual file instead.
Signed-off-by: Gao Xiang
---
include/erofs/internal.h | 3 +-
lib/blobchunk.c | 6 ++--
lib/inode.c | 67 +++-
lib/super.c | 1 -
4 files changed, 35
Source kernel commit: bb88e8da00253bea0e7f0f4cdfd7910572d7799f
Signed-off-by: Gao Xiang
---
lib/xattr.c | 92 +
1 file changed, 44 insertions(+), 48 deletions(-)
diff --git a/lib/xattr.c b/lib/xattr.c
index 6711dcc1..a2ef8d20 100644
--- a/lib
In order to prepare for the upcoming metadata compression.
Signed-off-by: Gao Xiang
---
include/erofs/cache.h| 9 +
include/erofs/internal.h | 6 --
include/erofs/io.h | 2 +-
lib/cache.c | 12 +---
lib/io.c | 6 +++---
mkfs/main.c
To match pread(), swap the order of `len` and `pos`.
Signed-off-by: Gao Xiang
---
include/erofs/io.h | 4 ++--
lib/io.c | 8
lib/super.c| 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/erofs/io.h b/include/erofs/io.h
index 14d6e45f
-disk NIDs because of non-LTS 32-bit application compatibility.
Co-developed-by: Gao Xiang
Signed-off-by: Bo Liu
Signed-off-by: Gao Xiang
---
change since v5:
- adjust inode numbers for metadata-compressed inodes in order to
keep compatibility with non-LTS applications.
Documentation/ABI
On 2025/7/18 09:52, Chao Yu wrote:
Hi Xiang,
On 2025/7/17 16:26, Gao Xiang wrote:
Hi Chao,
On 2025/7/14 17:39, Chao Yu wrote:
This patch supports to readahead more blocks in erofs_readdir(), it can
enhance readdir performance in large direcotry.
readdir test in a large directory which
LONG - 1)
#define EROFS_I_BL_Z_BIT (BITS_PER_LONG - 2)
+/* default readahead size of directory */
/* default readahead size of directories */
Otherwise it looks good to me.
Thanks,
Gao Xiang
+#define EROFS_DIR_RA_BYTES 16384
From: Bo Liu
Thanks to the meta buffer infrastructure, metadata-compressed inodes are
just read from the metabox inode instead of the blockdevice (or backing
file) inode.
The same is true for shared extended attributes.
Co-developed-by: Gao Xiang
Signed-off-by: Bo Liu
Signed-off-by: Gao
inode` if
COMPAT_SHARED_EA_IN_METABOX is set.
[1] https://issues.redhat.com/browse/RHEL-75783
Signed-off-by: Gao Xiang
---
fs/erofs/erofs_fs.h | 13 ++---
fs/erofs/internal.h | 2 ++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_
4 (4636KiB) ___|
[ Note: directory data is still left uncompressed by `mkfs.erofs` so
the final image sizes can be further smaller. Directory data
is just like regular data, which only needs some userspace work
so let's address it later. ]
Thanks,
Gao Xiang
v3/4:
https://
pport DEFLATE decompression by using Intel QAT")
Signed-off-by: Bo Liu
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
ENOATTR is not defined in Linux; use ENODATA instead.
Signed-off-by: Gao Xiang
---
fs/erofs/xattr.c | 32
fs/erofs/xattr.h | 3 ---
2 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c
index 9cf84717a92e
much difference
to avoid memcpy() in the whole I/O path (because Huffman tree
and FSE table are already slow), but lz4 matters.
Thanks,
Gao Xiang
testing, I think we should rely on
CRYPTO_ACOMP or CRYPTO_ACOMP2 instead.
Otherwise it will still fails.
Thanks,
Gao Xiang
: crypto_alloc_acomp
referenced by decompressor_crypto.c
fs/erofs/decompressor_crypto.o:(z_erofs_crypto_enable_engine) in
archive vmlinux.a
Could you add a `Fixes` tag for this?
Signed-off-by: Bo Liu
Thanks, let me reconfirm if if can resolved the issue.
Thanks,
Gao Xiang
From: Bo Liu
Thanks to the meta buffer infrastructure, metadata-compressed inodes are
just read from the metabox inode instead of the blockdevice (or backing
file) inode.
The same is true for shared extended attributes.
Co-developed-by: Gao Xiang
Signed-off-by: Bo Liu
Signed-off-by: Gao
__ `-m4096` __|___ 377856000 ( 361MiB) ___|
|_|_ `-m4096` (lz4hc,12) _|___ 377942016 ( 361MiB) ___|
Thanks,
Gao Xiang
v2: https://lore.kernel.org/r/20250711094004.2488-1-liub...@inspur.com
Changes since v2:
- refine the ondisk format and implementation.
Bo Liu (1):
erofs: implemen
From: Bo Liu
Thanks to the meta buffer infrastructure, metadata-compressed inodes are
just read from the metabox inode instead of the blockdevice (or backing
file) inode.
The same is true for shared extended attributes.
Co-developed-by: Gao Xiang
Signed-off-by: Bo Liu
Signed-off-by: Gao
inode` if
COMPAT_SHARED_EA_IN_METABOX is set.
[1] https://issues.redhat.com/browse/RHEL-75783
Signed-off-by: Gao Xiang
---
fs/erofs/erofs_fs.h | 13 ++---
fs/erofs/internal.h | 2 ++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_
.. Avoid erofs_dev_write() and use the bdev virtual file instead.
Signed-off-by: Gao Xiang
---
include/erofs/internal.h | 3 +-
lib/blobchunk.c | 6 ++--
lib/inode.c | 67 +++-
lib/super.c | 1 -
4 files changed, 35
.. Need more library work for ztailpacking.
Fixes: f978245e9da8 ("erofs-utils: support encoded extents")
Signed-off-by: Gao Xiang
---
lib/compress.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/compress.c b/lib/compress.c
index a57bb6a3..22fb5d6d 100644
In order to prepare for the upcoming metadata compression.
Signed-off-by: Gao Xiang
---
include/erofs/cache.h| 9 +
include/erofs/internal.h | 6 --
include/erofs/io.h | 2 +-
lib/cache.c | 12 +---
lib/io.c | 6 +++---
mkfs/main.c
- Avoid calling erofs_map_dev() for unmapped extents;
- Assign `iomap->addr` for inline extents too (since they have physical
location).
Signed-off-by: Gao Xiang
---
fs/erofs/data.c | 27 +--
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/fs/er
There is no need to keep additional local metabufs since we already
have one in `struct erofs_map_blocks`.
This was actually a leftover when applying meta buffers to zmap
operations, see commit 09c543798c3c ("erofs: use meta buffers for
zmap operations").
Signed-off-by: Gao Xiang
---
On 2025/7/16 12:54, Qu Wenruo wrote:
在 2025/7/16 10:46, Gao Xiang 写道:
...
There's some discrepancy between filesystems whether you need scratch
space for decompression. Some filesystems read the compressed data into
the pagecache and decompress in-place, while other filesystems
fastest LZ77-family algorithms like LZ4, LZO just operates on virtual
consecutive buffers and treat the decompressed buffer as LZ77 sliding
window.
So that either you need to allocate another temporary consecutive
buffer (I believe that is what btrfs does) or use vmap() approach,
EROFS is interes
On 2025/7/16 07:32, Gao Xiang wrote:
Hi Matthew,
On 2025/7/16 04:40, Matthew Wilcox wrote:
I've started looking at how the page cache can help filesystems handle
compressed data better. Feedback would be appreciated! I'll probably
say a few things which are obvious to anyone who
1 - 100 of 3633 matches
Mail list logo