On 2025/3/1 22:49, Hongzhen Luo wrote:
Move the `struct erofs_anon_fs_type` to the super.c and
expose it in preparation for the upcoming page cache share
feature.
Signed-off-by: Hongzhen Luo
Looks good. Feel free to add:
Reviewed-by: Hongbo Li
---
fs/erofs/fscache.c | 13
On 2025/3/1 22:49, Hongzhen Luo wrote:
Only files in the same domain will share the page cache. Also modify
the sysfs related content in preparation for the upcoming page cache
share feature.
Signed-off-by: Hongzhen Luo
---
fs/erofs/super.c | 12
1 file changed, 8 insertions(
large OBS objects.
Hongbo Li (4):
erofs-utils: lib: introduce --meta_fix format option
erofs-utils: lib: Implement the main logic for --meta_fix option
erofs-utils: lib: add --meta_only format option
erofs-utils: lib: remove the compile warning
include/erofs/blobraw.h | 29
: Hongbo Li
---
include/erofs/blobraw.h | 28 ++
lib/Makefile.am | 3 +-
lib/blobraw.c | 121
lib/inode.c | 6 ++
mkfs/main.c | 15 +
5 files changed, 172 insertions(+), 1 deletion(-)
create mode
Add the condition macro to avoid the compile warning.
Signed-off-by: Hongbo Li
---
lib/decompress.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/decompress.c b/lib/decompress.c
index 3f553a8..1e9fad7 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -9,6 +9,8 @@
#include
This option is used to drop the data part based on --meta_fix.
It allows the user can only get the metadata part of the erofs
images.
Signed-off-by: Hongbo Li
---
include/erofs/blobraw.h | 3 ++-
include/erofs/config.h | 1 +
lib/blobraw.c | 42
The option --meta_fix format option allow the mkfs.erofs
can fix the metadata area at the front of the image file.
It makes the disk format easier.
Now we only allow to fix the metadata area at the front
in EROFS_INODE_FLAG_PLAIN layout.
Signed-off-by: Hongbo Li
---
include/erofs/config.h | 1
On 2025/4/22 21:50, Gao Xiang wrote:
Hi Hongbo,
On 2025/4/22 20:36, Hongbo Li wrote:
In this patchset, we have added two formatting options --meta_fix and
--meta_only to extend the ability of EROFS. In the case of using OBS,
we can convert the directory tree structure from OBS into the
On 2025/4/27 10:15, Gao Xiang wrote:
Create one if the file doesn't exist.
Fixes: b6b741d8daaf ("erofs-utils: lib: get rid of tmpfile()")
I think the real fixes should be Fixes: bbeec3c93076 ("erofs-utils:
mkfs: add extra blob device support").
Signed-off-by: Gao Xiang
---
lib/blobchun
On 2025/4/27 15:17, Gao Xiang wrote:
On 2025/4/27 15:04, Hongbo Li wrote:
On 2025/4/27 10:56, Gao Xiang wrote:
...
diff --git a/lib/blobchunk.c b/lib/blobchunk.c
index e6386d6..301f46a 100644
--- a/lib/blobchunk.c
+++ b/lib/blobchunk.c
@@ -627,7 +627,8 @@ int erofs_blob_init(const
On 2025/4/27 15:17, Gao Xiang wrote:
On 2025/4/27 15:04, Hongbo Li wrote:
On 2025/4/27 10:56, Gao Xiang wrote:
...
diff --git a/lib/blobchunk.c b/lib/blobchunk.c
index e6386d6..301f46a 100644
--- a/lib/blobchunk.c
+++ b/lib/blobchunk.c
@@ -627,7 +627,8 @@ int erofs_blob_init(const
-t nfs $IP:/mnt/erofs /mnt/nfs
5. md5sum /mnt/nfs/foo # foo is the file which nid bigger
than UINT_MAX.
For overlayfs case, the under filesystem's file handle is
encoded in ovl_fb.fid, it is same as NFS's case.
Fixes: 3e917cc305c6 ("erofs: make filesystem exportable")
S
I have a solid background in file systems and since much of my
recent work has focused on EROFS, I am familiar with it. Now I
have the time and am willing to help review EROFS patches.
I hope my participation can be helpful to the EROFS patch review
process.
Signed-off-by: Hongbo Li
const inode = new_inode(sb);
+ struct inode *inode;
+ int err;
+ err = z_erofs_init_pcpu_workers();
+ if (err)
+ return err;
+
This will slow down the first mount action, but it seems unavoidable for
now. :)
Reviewed-by: Hongbo Li
Thanks,
Hongbo
+
Hi Sandeep,
The consecutive chunks will be merged if possible, but after commit
545988a65131 ("erofs-utils: lib: Fix calculation of minextblks when
working with sparse files"), the @minextblks will be updated into a
smaller value even the chunks are consecutive by blobchunks.c:379. I
think m
On 2025/4/27 10:56, Gao Xiang wrote:
Hi Hongbo,
On 2025/4/27 10:49, Hongbo Li wrote:
On 2025/4/27 10:15, Gao Xiang wrote:
Create one if the file doesn't exist.
Fixes: b6b741d8daaf ("erofs-utils: lib: get rid of tmpfile()")
I think the real fixes should be Fixes: bbeec
On 2025/4/24 14:51, Sandeep Dhavale wrote:
On Wed, Apr 23, 2025 at 6:50 PM Hongbo Li wrote:
Hi Sandeep,
The consecutive chunks will be merged if possible, but after commit
545988a65131 ("erofs-utils: lib: Fix calculation of minextblks when
working with sparse files"), the @
Some options are supported depending on different compiling config,
and these option will not fail during mount if they are not
supported. This is very weird, so we can reject them if they are
not supported.
Signed-off-by: Hongbo Li
---
fs/erofs/super.c | 39
Opt_err is not used in EROFS, we can remove it.
Signed-off-by: Hongbo Li
---
fs/erofs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index c1c350c6fbf4..fd365a611f13 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -356,8
On 2025/4/29 15:41, Hongbo Li wrote:
In erofs, the inode number has the location information of
files. The default encode_fh uses the ino32, this will lack
of some information when the file is too big. So we need
the internal helpers to encode filehandle.
It is easy to reproduce test:
1
file handle is
encoded in ovl_fb.fid, it is same as NFS's case.
Fixes: 3e917cc305c6 ("erofs: make filesystem exportable")
Signed-off-by: Hongbo Li
---
v2: https://lore.kernel.org/all/20250429074109.689075-1-lihongb...@huawei.com/
- Assign parent nid with correct value.
v1: htt
which
reduced the array capacity to 16 folios.
It was now trivial to trigger the bug by manually invoking readahead
from userspace, e.g.:
posix_fadvise(fd, 0, st.st_size, POSIX_FADV_WILLNEED);
Thanks,
Tested-by Hongbo Li
This should be fixed by invoking erofs_onlinefolio_split() only af
, so we keep them in the old way (e.g.: will error
out the log if they are not supported).
Signed-off-by: Hongbo Li
---
v1: https://lore.kernel.org/all/20250428142545.484818-1-lihongb...@huawei.com/
- Keep (no)acl and (no)user_xattr in old way.
---
fs/erofs/super.c | 23
Opt_err is not used in EROFS, we can remove it.
Signed-off-by: Hongbo Li
---
v1: https://lore.kernel.org/all/20250428142631.488431-1-lihongb...@huawei.com/
- Keep the trailing ','.
---
fs/erofs/super.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/erofs/super.c b/fs/ero
diff --git a/include/erofs/defs.h b/include/erofs/defs.h
index 051a270531ca..196dfa8191a8 100644
--- a/include/erofs/defs.h
+++ b/include/erofs/defs.h
@@ -19,6 +19,7 @@ extern "C"
#include
#include
#include
+#include
Reviewed-by: Hongbo Li
#ifdef HAVE_CONFIG_H
#include
On 2025/4/29 11:31, Gao Xiang wrote:
Hi Hongbo,
I think the subject can be updated as:
`erofs-utils: fix file handle encoding for 64-bit NIDs`
On Tue, Apr 29, 2025 at 01:11:39AM +, Hongbo Li wrote:
In erofs, the inode number has the location information of
files. The default encode_fh
file handle is
encoded in ovl_fb.fid, it is same as NFS's case.
Fixes: 3e917cc305c6 ("erofs: make filesystem exportable")
Signed-off-by: Hongbo Li
---
v1: https://lore.kernel.org/all/20250429011139.686847-1-lihongb...@huawei.com/
- Encode generation into file handle and minor cl
On 2025/4/29 11:54, Gao Xiang wrote:
On Tue, Apr 29, 2025 at 11:46:39AM +0800, Hongbo Li wrote:
...
Another thing is that I'm not sure if "user_xattr" option is really
needed, we might just kill this option since all recent fses don't
have such configuration and u
On 2025/4/28 23:16, Gao Xiang wrote:
On Mon, Apr 28, 2025 at 02:25:45PM +, Hongbo Li wrote:
Some options are supported depending on different compiling config,
and these option will not fail during mount if they are not
supported. This is very weird, so we can reject them if they are
not
system exportable")
Signed-off-by: Hongbo Li
---
v3: https://lore.kernel.org/all/20250429134257.690176-1-lihongb...@huawei.com/
- Improve commit message readability as suggested by Xiang.
- Remove extra variable to make the code simpler as suggested
by Xiang.
v2: https://lore.ker
On 2025/3/1 22:49, Hongzhen Luo wrote:
When creating the EROFS image, users can specify the fingerprint name.
This is to prepare for the upcoming inode page cache share.
Signed-off-by: Hongzhen Luo
---
fs/erofs/Kconfig| 10 +
fs/erofs/erofs_fs.h | 9 ++---
fs/erofs/inter
On 2025/5/7 16:52, Gao Xiang wrote:
Fixes: b08e804b1dd1 ("erofs-utils: lib: wrap up zeropadding calculation")
Signed-off-by: Gao Xiang
---
lib/decompress.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/decompress.c b/lib/decompress.c
index 3f553a8..1f9daea 100
On 2025/5/13 19:34, Sheng Yong wrote:
From: Sheng Yong
When attempting to use an archive file, such as APEX on android,
as a file-backed mount source, it fails because EROFS image within
the archive file does not start at offset 0. As a result, a loop
device is still needed to attach the ima
On 2025/5/13 21:56, Hongbo Li wrote:
On 2025/5/13 19:34, Sheng Yong wrote:
From: Sheng Yong
When attempting to use an archive file, such as APEX on android,
as a file-backed mount source, it fails because EROFS image within
the archive file does not start at offset 0. As a result, a loop
On 2025/5/13 19:27, Sheng Yong wrote:
On 5/13/25 15:17, Gao Xiang wrote:
On 2025/5/13 15:06, Hongbo Li wrote:
On 2025/4/8 20:23, Sheng Yong wrote:
From: Sheng Yong
When attempting to use an archive file, such as APEX on android,
as a file-backed mount source, it fails because EROFS
z_erofs_bvec_item {
@@ -1112,18 +1108,20 @@ struct z_erofs_bvec_item {
static void z_erofs_do_decompressed_bvec(struct z_erofs_backend *be,
struct z_erofs_bvec *bvec)
{
+ int poff = bvec->offset + be->pcl->pageofs_out;
Looks good!
Reviewed-by:
On 2025/5/6 23:10, Gao Xiang wrote:
Hi Hongbo,
On 2025/4/29 21:42, Hongbo Li wrote:
In erofs, the inode number has the location information of
files. The default encode_fh uses the ino32, this will lack
of some information when the file is too big. So we need
the internal helpers to encode
On 2025/5/7 10:42, Gao Xiang wrote:
On 2025/5/7 09:53, Hongbo Li wrote:
On 2025/5/6 23:10, Gao Xiang wrote:
Hi Hongbo,
On 2025/4/29 21:42, Hongbo Li wrote:
In erofs, the inode number has the location information of
files. The default encode_fh uses the ino32, this will lack
of some
On 2025/4/8 20:23, Sheng Yong wrote:
From: Sheng Yong
When attempting to use an archive file, such as APEX on android,
as a file-backed mount source, it fails because EROFS image within
the archive file does not start at offset 0. As a result, a loop
device is still needed to attach the imag
On 2025/5/13 19:34, Sheng Yong wrote:
From: Sheng Yong
For multiple devices, both primary and extra devices should be the
same type. `erofs_init_device` has already guaranteed that if the
primary is a file-backed device, extra devices should also be
regular files.
However, if the primary is
(file == ERR_PTR(-ENOTBLK))
+ return -EINVAL;
return PTR_ERR(file);
+ }
Reviewed-by: Hongbo Li
Thanks,
Hongbo
if (!erofs_is_fileio_mode(sbi)) {
dif->dax_dev = fs_dax_get_by_bdev(file_bdev(file),
On 2025/5/14 20:17, Bo Liu wrote:
This patch introdueces the use of the Intel QAT to decompress compressed
data in the EROFS filesystem, aiming to improve the decompression speed
of compressed datea.
We created a 285MiB compressed file and then used the following command to
create EROFS image
On 2025/5/14 20:08, Gao Xiang wrote:
- trace_erofs_readpages => trace_erofs_readahead;
- Rename a redundant statement `nrpages = readahead_count(rac);`;
- Move the tracepoint to the beginning of z_erofs_readahead().
Signed-off-by: Gao Xiang
Reviewed-by: Hongbo Li
Thanks,
Hon
-fsoffset=%lu Specify image offset for the primary device.
+fsoffset=%lu Specify block-aligned filesystem offset for the primary
device.
Thanks,
Reviewed-by: Hongbo Li
===
=
Sysfs Entries
di
On 2025/5/16 16:26, Bo Liu wrote:
This patch introdueces the use of the Intel QAT to decompress compressed
data in the EROFS filesystem, aiming to improve the decompression speed
of compressed datea.
We created a 285MiB compressed file and then used the following command to
create EROFS image
Hi, Xiang,
On 2025/5/31 8:29, Gao Xiang wrote:
The timestamp of the packed inode should be fixed to the build time.
Fixes: 9fa9b017f773 ("erofs-utils: mkfs: support fragments")
Signed-off-by: Gao Xiang
---
lib/inode.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
di
On 2025/6/2 20:23, Gao Xiang wrote:
Hi Hongbo,
On 2025/6/2 17:31, Hongbo Li wrote:
Hi, Xiang,
On 2025/5/31 8:29, Gao Xiang wrote:
The timestamp of the packed inode should be fixed to the build time.
Fixes: 9fa9b017f773 ("erofs-utils: mkfs: support fragments")
Signed-off-by:
From: Gao Xiang
The timestamp of the packed inode should be fixed to the build time.
Fixes: 9fa9b017f773 ("erofs-utils: mkfs: support fragments")
Signed-off-by: Gao Xiang
[hongbo: minor adjust]
Signed-off-by: Hongbo Li
---
change since v2:
- compare path with strcmp;
change since
ib/inode.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
Reviewed-by: Hongbo Li
Thanks,
Hongbo
diff --git a/lib/inode.c b/lib/inode.c
index 7a10624..9095ebc 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -910,7 +910,8 @@ out:
return 0;
}
-s
old_cred = override_creds(rq->iocb.ki_filp->f_cred);Yeah,
rq->iocb.ki_filp keep the opener's cred, so:
Reviewed-by: Hongbo Li
Thanks,
Hongbo
ret = vfs_iocb_iter_read(rq->iocb.ki_filp, &rq->iocb, &iter);
+ revert_creds(old_cred);
if (ret !=
: 13f06f48f7bf ("staging: erofs: support tracepoint")
Cc: sta...@vger.kernel.org
Signed-off-by: Gao Xiang
---
include/trace/events/erofs.h | 18 --
1 file changed, 18 deletions(-)
Reviewed-by: Hongbo Li
Thanks,
Hongbo
diff --git a/include/trace/events/erofs.h b/inc
On 2025/6/13 20:17, Steven Rostedt wrote:
On Fri, 13 Jun 2025 14:08:32 +0800
Gao Xiang wrote:
Hi Steven,
On 2025/6/13 10:49, Steven Rostedt wrote:
I have code that will trigger a warning if a trace event is defined but
not used[1]. It gives a list of unused events. Here's what I have for
Hi Bo,
On 2025/7/11 17:40, Bo Liu wrote:
Filesystem metadata has a high degree of redundancy, so
should compress well in the general case.
To implement this feature, we make a special on-disk inode
which keeps all metadata as its data, and then compress the
special on-disk inode with the given a
On 2025/7/14 11:15, Gao Xiang wrote:
..
if (!name)
return -EINVAL;
@@ -411,9 +416,12 @@ int erofs_getxattr(struct inode *inode, int
index, const char *name,
if (it.name.len > EROFS_NAME_LEN)
return -ERANGE;
+ if (erofs_sb_has_xattr_compr(sbi))
Is xattr_
On 2025/7/7 16:47, Chao Yu wrote:
All below functions will do sanity check on m->type, let's move sanity
check to z_erofs_load_compact_lcluster() for cleanup.
- z_erofs_map_blocks_fo
- z_erofs_get_extent_compressedlen
- z_erofs_get_extent_decompressedlen
- z_erofs_extent_lookback
Signed-off-b
On 2025/7/8 10:30, Hongbo Li wrote:
On 2025/7/7 16:47, Chao Yu wrote:
All below functions will do sanity check on m->type, let's move sanity
check to z_erofs_load_compact_lcluster() for cleanup.
- z_erofs_map_blocks_fo
- z_erofs_get_extent_compressedlen
- z_erofs_get_extent_decompr
On 2025/7/8 10:35, Gao Xiang wrote:
On 2025/7/8 10:30, Hongbo Li wrote:
On 2025/7/7 16:47, Chao Yu wrote:
All below functions will do sanity check on m->type, let's move sanity
check to z_erofs_load_compact_lcluster() for cleanup.
- z_erofs_map_b
On 2025/7/28 9:49, Yuezhang Mo wrote:
If using multiple devices, we should check if the extra device support
DAX instead of checking the primary device when deciding if to use DAX
to access a file.
If an extra device does not support DAX we should fallback to normal
access otherwise the data
Hi Yuezhang,
On 2025/7/28 12:54, Yuezhang Mo wrote:
If using multiple devices, we should check if the extra device support
DAX instead of checking the primary device when deciding if to use DAX
to access a file.
If an extra device does not support DAX we should fallback to normal
access other
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 from
s3-compatible object store back
On 2025/8/1 15:46, Gao Xiang wrote:
On 2025/8/1 15:30, Yifan Zhao wrote:
From: zhaoyifan
This patch introduces configuration options for the upcoming
experimental S3
support, including configuration parsing and passwd_file reading logic.
User could specify the following options:
- S3 s
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: Hongbo Li
Thanks,
Hongbo
---
Changes of v3:
- uniformly use erofs_info() to output the logs of turning off DAX
Changes of v2
ok, thanks!
On 2024/4/24 11:29, Gao Xiang wrote:
(+cc linux-erofs & LKML)
On 2024/4/24 10:39, Hongbo Li wrote:
When prepare_ondemand_read failed, wrong error message is printed.
The prepare_read is also implemented in cachefiles, so we amend it.
Signed-off-by: Hongbo Li
Reviewed-by:
When prepare_ondemand_read failed, wrong error message is printed.
The prepare_read is also implemented in cachefiles, so we amend it.
Reviewed-by: Gao Xiang
Signed-off-by: Hongbo Li
---
fs/erofs/fscache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/erofs/fscache.c b
/erofs_ondemand
cat: /sys/fs/erofs/features/erofs_ondemand: No such file or directory
[After]
$ cat /sys/fs/erofs/features/erofs_ondemand
supported
Signed-off-by: Hongbo Li
---
fs/erofs/sysfs.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c
index
: No such file or directory
[After]
$ cat /sys/fs/cachefiles/features/cachefiles_ondemand
supported
Signed-off-by: Hongbo Li
---
fs/cachefiles/Makefile | 3 +-
fs/cachefiles/internal.h | 7 +++
fs/cachefiles/main.c | 7 +++
fs/cachefiles/sysfs.c| 101
interface for users'
applications to obtain this.
Comments and questions are, as always, welcome.
Please let me know what you think.
Thanks,
Hongbo
Hongbo Li (2):
erofs: support query erofs ondemand feature by sysfs interface
cachefiles: support query cachefiles ondemand feature
On 2024/6/21 17:14, Gao Xiang wrote:
On 2024/6/21 14:18, Hongbo Li wrote:
Erofs over fscache need CONFIG_CACHEFILES_ONDEMAND in cachefiles
module. We cannot know whether it is supported from userspace, so
we export this feature to user by sysfs interface.
[Before]
$ cat /sys/fs/cachefiles
On 2024/6/21 18:42, Gao Xiang wrote:
Hi,
On 2024/6/21 18:06, Gao Xiang wrote:
On 2024/6/21 17:37, Hongbo Li wrote:
On 2024/6/21 17:14, Gao Xiang wrote:
On 2024/6/21 14:18, Hongbo Li wrote:
Erofs over fscache need CONFIG_CACHEFILES_ONDEMAND in cachefiles
module. We cannot know
inux.alibaba.com
Signed-off-by: Gao Xiang
Signed-off-by: Hongbo Li
---
fs/erofs/data.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index 029c761670bf..c98aeda8abb2 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -220
: 0033:0x403ace
```
The reason is the same with 8bd90b6ae7856("erofs: fix NULL dereference
of dif->bdev_handle in fscache mode") in mainline. So we should backport
this
patch into stable linux-6.6.y to avoid this bug.
On 2024/6/27 17:13, Hongbo Li wrote:
From: Jingbo Xu
Avoid NULL
On 2024/6/24 20:58, Gao Xiang wrote:
On 2024/6/24 19:58, Hongbo Li wrote:
On 2024/6/21 18:42, Gao Xiang wrote:
Hi,
On 2024/6/21 18:06, Gao Xiang wrote:
On 2024/6/21 17:37, Hongbo Li wrote:
On 2024/6/21 17:14, Gao Xiang wrote:
On 2024/6/21 14:18, Hongbo Li wrote:
Erofs over
(/mnt/erofs/testfile) = 0
dio mem align:512
dio offset align:512
```
Signed-off-by: Hongbo Li
---
fs/erofs/inode.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index 5f6439a63af7..9325a6f0058a 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs
On 2024/7/17 10:00, Gao Xiang wrote:
Hi,
On 2024/7/16 20:45, Hongbo Li wrote:
Add support for STATX_DIOALIGN to erofs, so that direct I/O
alignment restrictions are exposed to userspace in a generic
way.
[Before]
```
./statx_test /mnt/erofs/testfile
statx(/mnt/erofs/testfile) = 0
dio mem
ffset and size now is restricted
by erofs, since `i_blocksize` is enough for the under filesystems.
Signed-off-by: Hongbo Li
---
fs/erofs/data.c| 3 ++
fs/erofs/fscache.c | 95 +++---
2 files changed, 93 insertions(+), 5 deletions(-)
diff --git a/fs/
On 2024/7/18 10:41, Gao Xiang wrote:
On 2024/7/17 14:34, Hongbo Li wrote:
On 2024/7/17 10:00, Gao Xiang wrote:
Hi,
On 2024/7/16 20:45, Hongbo Li wrote:
Add support for STATX_DIOALIGN to erofs, so that direct I/O
alignment restrictions are exposed to userspace in a generic
way
(/mnt/erofs/testfile) = 0
dio mem align:512
dio offset align:512
```
Signed-off-by: Hongbo Li
---
v2:
- Removing the non-bdev case for obtaining the bsize.
v1:
https://lore.kernel.org/all/afe7b51b-b235-4ad5-80a5-16e0e61e1...@linux.alibaba.com/T/
---
fs/erofs/inode.c | 17 +
1
On 2024/7/18 10:40, Gao Xiang wrote:
Hi Hongbo,
I'd like to request Jingbo's review too.
On 2024/7/18 09:05, Hongbo Li wrote:
erofs over fscache cannot handle the direct read io. When the file
is opened with O_DIRECT flag, -EINVAL will reback. We support the
DIO in erofs over
On 2024/7/18 16:35, Gao Xiang wrote:
On 2024/7/18 16:32, Gao Xiang wrote:
From: Hongbo Li via Linux-erofs
Also I will fix the email address issue
(Hongbo Li ) when applying too.
Add support for STATX_DIOALIGN to erofs, so that direct I/O
alignment restrictions are exposed to
On 2024/7/18 16:14, Gao Xiang wrote:
On 2024/7/18 15:11, Hongbo Li wrote:
On 2024/7/18 10:40, Gao Xiang wrote:
Hi Hongbo,
I'd like to request Jingbo's review too.
On 2024/7/18 09:05, Hongbo Li wrote:
erofs over fscache cannot handle the direct read io. When the file
is o
On 2024/7/22 14:53, Hongzhen Luo wrote:
Currently, reading files with different paths (or names) but the same
content will consume multiple copies of the page cache, even if the
content of these page caches is the same. For example, reading identical
files (e.g., *.so files) from two different
On 2024/7/25 16:42, Gao Xiang wrote:
Hi all,
On 2024/7/25 15:43, Hongbo Li via Linux-erofs wrote:
On 2024/7/22 14:53, Hongzhen Luo wrote:
Currently, reading files with different paths (or names) but the same
content will consume multiple copies of the page cache, even if the
content of
ffset and size now is restricted
by erofs, since `i_blocksize` is enough for the under filesystems.
Signed-off-by: Hongbo Li
---
v2:
- Change the directIO helper name to erofs_fscache_direct_io
- Add some io interception when begin direct io
- Optimize the direct io logic
On 2024/7/29 20:09, Jingbo Xu wrote:
On 7/26/24 10:06 AM, Hongbo Li wrote:
erofs over fscache cannot handle the direct read io. When the file
is opened with O_DIRECT flag, -EINVAL will reback. We support the
DIO in erofs over fscache by bypassing the erofs page cache and
reading target
On 2024/7/31 16:07, Hongzhen Luo wrote:
This modifies relevant functions to apply the page cache
share feature.
Signed-off-by: Hongzhen Luo
---
v2: Make adjustments based on the latest implementation.
v1:
https://lore.kernel.org/all/20240722065355.1396365-5-hongz...@linux.alibaba.com/
---
On 2024/7/31 16:07, Hongzhen Luo wrote:
Currently, reading files with different paths (or names) but the same
content will consume multiple copies of the page cache, even if the
content of these page caches is the same. For example, reading identical
files (e.g., *.so files) from two different
On 2024/8/1 19:35, Hongzhen Luo wrote:
On 2024/8/1 19:31, Gao Xiang wrote:
On 2024/8/1 19:26, Hongzhen Luo wrote:
- Use i_size instead of i_size_read() due to immutable fses;
- Get rid of an unneeded goto since erofs_fill_dentries() also works;
- Remove unnecessary lines.
Signed-
On 2025/2/7 14:41, Hongzhen Luo wrote:
There's no need to enumerate each type. No logic changes.
Signed-off-by: Hongzhen Luo
---
fs/erofs/zmap.c | 59 ++---
1 file changed, 22 insertions(+), 37 deletions(-)
diff --git a/fs/erofs/zmap.c b/fs/er
On 2025/2/7 16:29, Gao Xiang wrote:
On 2025/2/7 16:08, Hongzhen Luo wrote:
There's no need to enumerate each type. No logic changes.
Signed-off-by: Hongzhen Luo
---
Changes since v1: Put the exception branch at the beginning.
v1:
https://lore.kernel.org/all/20250207064135.2249529-1-hon
rand read: IOPS=4101
- multi-round
seq read: IOPS=188k
rand read: IOPS=35.2k
[After]
- first round
seq read: IOPS=96.3k
rand read: IOPS=4245
- multi-round
seq read: IOPS=184k
rand read: IOPS=34.3k
Signed-off-by: Hongbo Li
---
fs/erofs/fileio.c | 72
part of the iov_iter
of direct io failed, the whole direct io also fails.
Signed-off-by: Hongbo Li
---
fs/erofs/fileio.c | 71 +++
1 file changed, 71 insertions(+)
diff --git a/fs/erofs/fileio.c b/fs/erofs/fileio.c
index cdd432ec266c..b652e3df050c 1
Introduce erofs_fileio_end_folio as the .bi_end_io callback for fileio
bio.
Signed-off-by: Hongbo Li
---
fs/erofs/fileio.c | 27 +++
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/fs/erofs/fileio.c b/fs/erofs/fileio.c
index 616dc93c0dc5..cdd432ec266c
: 4.0Gi0B 4.0Gi
only cost 1GB memory (the test file is 1GB)
buffer io: 96.6k (seq read), 4245 (rand read)
direct io: 21.6k (seq read), 4187 (rand read)
```
Signed-off-by: Hongbo Li
---
fs/erofs/data.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff
lcome.
Thanks,
Hongbo.
Hongbo Li (4):
erofs: decouple the iterator on folio
erofs: decouple callback action for fileio bio
erofs: add erofs_fileio_direct_io helper to handle direct io
erofs: file-backed mount supports direct io
fs/erofs/data.c | 10 ++-
fs/erofs/fileio.c
On 2025/1/20 9:58, Gao Xiang wrote:
Hi Hongbo,
On 2025/1/15 15:09, Hongbo Li wrote:
erofs has add file-backed mount support. In this scenario, only buffer
io is allowed. So we enhance the io mode by implementing the direct
io. Also, this can make the iov_iter (user buffer) interact with the
On 2025/1/20 11:10, Gao Xiang wrote:
On 2025/1/20 11:02, Hongbo Li wrote:
...
}
+static int erofs_fileio_scan_iter(struct erofs_fileio *io, struct
kiocb *iocb,
+ struct iov_iter *iter)
I wonder if it's possible to just extract a folio from
`struct iov_iter
On 2025/1/5 23:12, Hongzhen Luo wrote:
This modifies relevant functions to apply the page cache
share feature.
Below is the memory usage for reading all files in two different minor
versions of container images:
+---+--+-+---+
| I
On 2025/1/20 11:46, Gao Xiang wrote:
On 2025/1/20 11:43, Hongbo Li wrote:
On 2025/1/20 11:10, Gao Xiang wrote:
On 2025/1/20 11:02, Hongbo Li wrote:
...
}
+static int erofs_fileio_scan_iter(struct erofs_fileio *io, struct
kiocb *iocb,
+ struct iov_iter *iter
erofs has add file-backed mount support. In this scenario, only buffer
io is allowed. So we enhance the io mode by implementing the direct
io. Also, this can make the iov_iter (user buffer) interact with the
backed file's page cache directly.
Signed-off-by: Hongbo Li
---
fs/erofs/data.c
On 2025/1/15 15:09, Hongbo Li wrote:
erofs has add file-backed mount support. In this scenario, only buffer
io is allowed. So we enhance the io mode by implementing the direct
io. Also, this can make the iov_iter (user buffer) interact with the
backed file's page cache directly.
Base on
100 matches
Mail list logo