Re: [PATCH RESEND] erofs-utils: lib: fix `last_mapped_block` in erofs_bflush()

2023-08-31 Thread Jingbo Xu
On 9/1/23 11:16 AM, Gao Xiang wrote: > Currently, calling erofs_bflush() multiple times is broken due to > outdated `last_mapped_block`. > > Fixes: 82dee4501c5a ("erofs-utils: mkfs: enable xattr name filter feature by > default") > Fixes: 185b0bcdef4b ("erofs-utils: optimize buffer allocation

[PATCH RESEND] erofs-utils: lib: fix `last_mapped_block` in erofs_bflush()

2023-08-31 Thread Gao Xiang
Currently, calling erofs_bflush() multiple times is broken due to outdated `last_mapped_block`. Fixes: 82dee4501c5a ("erofs-utils: mkfs: enable xattr name filter feature by default") Fixes: 185b0bcdef4b ("erofs-utils: optimize buffer allocation logic") Cc: Jingbo Xu Signed-off-by: Gao Xiang ---

[PATCH] erofs-utils: lib: fix `last_mapped_block` in erofs_bflush()

2023-08-31 Thread Gao Xiang
Currently, calling erofs_bflush() multiple times is broken due to outdated `last_mapped_block`. Fixes: 82dee4501c5a ("erofs-utils: mkfs: enable xattr name filter feature by default") Fixes: 185b0bcdef4b ("erofs-utils: optimize buffer allocation logic") Cc: Jingbo Xu Signed-off-by: Gao Xiang ---

[PATCH] erofs-utils: lib: support importing xattrs for tarerofs

2023-08-31 Thread Gao Xiang
`SCHILY.xattr.attr` indicates a POSIX.1-2001 coded version of the Linux extended attributes. Let's dump such xattrs to erofs images. In addition, `LIBARCHIVE.xattr` is also supported, which uses URL-Encoding instead of the binary form. Signed-off-by: Gao Xiang --- include/erofs/tar.h | 1 +

Re: [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-08-31 Thread Jeff Layton
On Wed, 2023-08-30 at 01:19 +0100, Al Viro wrote: > On Wed, Jul 05, 2023 at 02:58:11PM -0400, Jeff Layton wrote: > > > + * POSIX mandates that the old and new parent directories have their ctime > > and > > + * mtime updated, and that inodes of @old_dentry and @new_dentry (if any), > > have > >

Re: [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-08-31 Thread Al Viro
On Wed, Jul 05, 2023 at 02:58:11PM -0400, Jeff Layton wrote: > + * POSIX mandates that the old and new parent directories have their ctime > and > + * mtime updated, and that inodes of @old_dentry and @new_dentry (if any), > have > + * their ctime updated. APPLICATION USAGE Some implementations

Re: [PATCH] erofs-utils: dump: support dumping xattr filter feature bit

2023-08-31 Thread Gao Xiang
On Thu, Aug 31, 2023 at 06:30:20PM +0800, Jingbo Xu wrote: > Add support for dumping xattr filter feature bit. > > Signed-off-by: Jingbo Xu Folded into the original patch since -dev hasn't been updated. Thanks, Gao Xiang

Re: [PATCH v7] erofs-utils: add support for fuse 2/3 lowlevel API

2023-08-31 Thread Li Yiyan
Hi Xiang: I'm very sorry that I made a mistake. erofs_getxattr can behave correctly in various situations. I will remove the workaround in the new version. On 2023/8/31 19:05, Gao Xiang wrote: > > > On 2023/8/31 18:48, Li Yiyan wrote: > > ... > + + vi->sbi = &sbi; + vi-

Re: [PATCH v7] erofs-utils: add support for fuse 2/3 lowlevel API

2023-08-31 Thread Li Yiyan
Hi Xiang, Thank you for your reminder, I will reconsider the reply_err part. Here is more information about the workaround. It can be considered that the return of size=0 is an interface specification that users should follow. https://github.com/philips/attr/blob/master/getfattr/getfattr.c#L298

[PATCH 5.4.y] erofs: ensure that the post-EOF tails are all zeroed

2023-08-31 Thread Gao Xiang
commit e4c1cf523d820730a86cae2c6d55924833b6f7ac upstream. This was accidentally fixed up in commit e4c1cf523d82 but we can't take the full change due to other dependancy issues, so here is just the actual bugfix that is needed. [Background] keltargw reported an issue [1] that with mmaped I/Os, s

[PATCH 4.19.y] erofs: ensure that the post-EOF tails are all zeroed

2023-08-31 Thread Gao Xiang
commit e4c1cf523d820730a86cae2c6d55924833b6f7ac upstream. This was accidentally fixed up in commit e4c1cf523d82 but we can't take the full change due to other dependancy issues, so here is just the actual bugfix that is needed. [Background] keltargw reported an issue [1] that with mmaped I/Os, s

[PATCH 5.15.y] erofs: ensure that the post-EOF tails are all zeroed

2023-08-31 Thread Gao Xiang
commit e4c1cf523d820730a86cae2c6d55924833b6f7ac upstream. This was accidentally fixed up in commit e4c1cf523d82 but we can't take the full change due to other dependancy issues, so here is just the actual bugfix that is needed. [Background] keltargw reported an issue [1] that with mmaped I/Os, s

[PATCH 5.10.y] erofs: ensure that the post-EOF tails are all zeroed

2023-08-31 Thread Gao Xiang
commit e4c1cf523d820730a86cae2c6d55924833b6f7ac upstream. This was accidentally fixed up in commit e4c1cf523d82 but we can't take the full change due to other dependancy issues, so here is just the actual bugfix that is needed. [Background] keltargw reported an issue [1] that with mmaped I/Os, s

[PATCH 6.1.y] erofs: ensure that the post-EOF tails are all zeroed

2023-08-31 Thread Gao Xiang
commit e4c1cf523d820730a86cae2c6d55924833b6f7ac upstream. This was accidentally fixed up in commit e4c1cf523d82 but we can't take the full change due to other dependancy issues, so here is just the actual bugfix that is needed. [Background] keltargw reported an issue [1] that with mmaped I/Os, s

[PATCH 6.5.y] erofs: ensure that the post-EOF tails are all zeroed

2023-08-31 Thread Gao Xiang
commit e4c1cf523d820730a86cae2c6d55924833b6f7ac upstream. This was accidentally fixed up in commit e4c1cf523d82 but we can't take the full change due to other dependancy issues, so here is just the actual bugfix that is needed. [Background] keltargw reported an issue [1] that with mmaped I/Os, s

[PATCH 6.4.y] erofs: ensure that the post-EOF tails are all zeroed

2023-08-31 Thread Gao Xiang
commit e4c1cf523d820730a86cae2c6d55924833b6f7ac upstream. This was accidentally fixed up in commit e4c1cf523d82 but we can't take the full change due to other dependancy issues, so here is just the actual bugfix that is needed. [Background] keltargw reported an issue [1] that with mmaped I/Os, s

Re: [PATCH v7] erofs-utils: add support for fuse 2/3 lowlevel API

2023-08-31 Thread Gao Xiang
On 2023/8/31 18:48, Li Yiyan wrote: ... + + vi->sbi = &sbi; + vi->nid = (erofs_nid_t)ino; + ret = erofs_read_inode_from_disk(vi); + if (ret < 0) { + fuse_reply_err(req, EIO); Maybe reply -ret? Since there are other errors in erofs_read_inode_from_disk. No. As

Re: [PATCH v7] erofs-utils: add support for fuse 2/3 lowlevel API

2023-08-31 Thread Li Yiyan
Hi Xiang, Thanks for your thoughtful comments, here are my replies. On 2023/8/29 22:17, Gao Xiang wrote: > Hi Yiyan, > > Would you mind addressing the following comments? I think it's almost > the time to formalize this: > > On 2023/8/26 17:25, Huang Jianan wrote: >> Hi Yiyan, >> Thanks for your

Re: [PATCH v7] erofs-utils: add support for fuse 2/3 lowlevel API

2023-08-31 Thread Li Yiyan
Hi Jianan, Thanks for your thoughtful comments, here are my replies. On 2023/8/26 17:25, Huang Jianan wrote: > Hi Yiyan, > Thanks for your work, I have some comments below, please check. > > On 2023/8/23 19:59, Li Yiyan wrote: >> Add support for the fuse low-level API in erofsfuse, proven correct

[PATCH] erofs-utils: dump: support dumping xattr filter feature bit

2023-08-31 Thread Jingbo Xu
Add support for dumping xattr filter feature bit. Signed-off-by: Jingbo Xu --- dump/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dump/main.c b/dump/main.c index 7980f78..5425b7b 100644 --- a/dump/main.c +++ b/dump/main.c @@ -91,6 +91,7 @@ struct erofsdump_feature { static struct e

[PATCH v2] erofs-utils: mkfs: enable xattr name filter feature by default

2023-08-31 Thread Jingbo Xu
From: Gao Xiang Turn it on by default since it's a compatible feature. Instead, it can be disabled explicitly with "-E^xattr-name-filter". Signed-off-by: Gao Xiang Signed-off-by: Jingbo Xu --- changes: flush inode bhs prior to erofs_mkfs_update_super_block(), otherwise the xattr filter featur

Re: Optimizing write_uncompressed_file_from_fd()

2023-08-31 Thread Gao Xiang
Hi Daan, On 2023/8/31 17:33, Daan De Meyer wrote: Hi, For hacking on systemd, we build disk images using mkosi, and use an erofs filesystem for the /usr directory. When hacking on systemd, we would like to be able to rebuild the disk image as fast as possible. One part of rebuilding the imag

Re: Optimizing write_uncompressed_file_from_fd()

2023-08-31 Thread Gao Xiang
Hi Daan, On 2023/8/31 17:33, Daan De Meyer wrote: Hi, For hacking on systemd, we build disk images using mkosi, and use an erofs filesystem for the /usr directory. When hacking on systemd, we would like to be able to rebuild the disk image as fast as possible. One part of rebuilding the imag

Optimizing write_uncompressed_file_from_fd()

2023-08-31 Thread Daan De Meyer
Hi, For hacking on systemd, we build disk images using mkosi, and use an erofs filesystem for the /usr directory. When hacking on systemd, we would like to be able to rebuild the disk image as fast as possible. One part of rebuilding the image that takes a while is generating the erofs filesystem.