[PATCH] fs/erofs/fileio: call erofs_onlinefolio_split() after bio_add_folio()

2025-04-28 Thread Max Kellermann
If bio_add_folio() fails (because it is full), erofs_fileio_scan_folio() needs to submit the I/O request via erofs_fileio_rq_submit() and allocate a new I/O request with an empty `struct bio`. Then it retries the bio_add_folio() call. However, at this point, erofs_onlinefolio_split() has already

Re: [PATCH v4] erofs: lazily initialize per-CPU workers and CPU hotplug hooks

2025-04-28 Thread Sandeep Dhavale
Hi Chao, > > - mount #1 - mount #2 > - z_erofs_init_pcpu_workers > - atomic_xchg(, 1) > - z_erofs_init_pcpu_workers > - atomic_xchg(, 1) > :

[PATCH] erofs: encode file handle with the internal helpers

2025-04-28 Thread Hongbo Li
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. Since i_generation in EROFS is not used, here we only encode the nid into file

[PATCH] erofs: reject unknown option if it is not supported

2025-04-28 Thread Hongbo Li
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 ++---

[PATCH] erofs: remove unused enum type

2025-04-28 Thread Hongbo Li
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

Re: [PATCH] erofs: reject unknown option if it is not supported

2025-04-28 Thread Gao Xiang
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 supported. > If it's an invalid o

Re: [PATCH] erofs: encode file handle with the internal helpers

2025-04-28 Thread Gao Xiang
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 uses the ino32, this will lack > of some

Re: [PATCH] erofs: reject unknown option if it is not supported

2025-04-28 Thread Gao Xiang
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 user_xattrs should be supported by default. > > > Yea

Re: [PATCH] fs/erofs/fileio: call erofs_onlinefolio_split() after bio_add_folio()

2025-04-28 Thread Hongbo Li
On 2025/4/29 7:09, Max Kellermann wrote: If bio_add_folio() fails (because it is full), erofs_fileio_scan_folio() needs to submit the I/O request via erofs_fileio_rq_submit() and allocate a new I/O request with an empty `struct bio`. Then it retries the bio_add_folio() call. However, at this

Re: [PATCH v4] erofs: lazily initialize per-CPU workers and CPU hotplug hooks

2025-04-28 Thread Chao Yu
Hi Sandeep, On 4/29/25 05:49, Sandeep Dhavale wrote: > Hi Chao, > >> >> - mount #1 - mount #2 >> - z_erofs_init_pcpu_workers >> - atomic_xchg(, 1) >> - z_erofs_init_pcpu_workers >> -

Re: [PATCH] fs/erofs/fileio: call erofs_onlinefolio_split() after bio_add_folio()

2025-04-28 Thread Gao Xiang
On Tue, Apr 29, 2025 at 01:09:33AM +0200, Max Kellermann wrote: > If bio_add_folio() fails (because it is full), > erofs_fileio_scan_folio() needs to submit the I/O request via > erofs_fileio_rq_submit() and allocate a new I/O request with an empty > `struct bio`. Then it retries the bio_add_folio

Re: [PATCH] erofs: reject unknown option if it is not supported

2025-04-28 Thread Hongbo Li
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 user_xattrs should be suppo

Re: [PATCH] erofs: reject unknown option if it is not supported

2025-04-28 Thread Hongbo Li
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

Re: [PATCH] erofs: remove unused enum type

2025-04-28 Thread Gao Xiang
On Mon, Apr 28, 2025 at 02:26:31PM +, Hongbo Li wrote: > 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.