Re: [f2fs-dev] [PATCH v2] f2fs: show the list of donation files

2025-08-13 Thread Chao Yu via Linux-f2fs-devel
On 8/14/25 00:24, Jaegeuk Kim via Linux-f2fs-devel wrote: > This patch introduces a proc entry to show the currently enrolled donation > files. > > - "File path" indicates a file. > - "Status" > a. "Donated" means the file is registed in the donation list by > fadvise(offset, length, POSIX_FA

Re: [f2fs-dev] [RFC PATCH 0/9] f2fs: Enable buffered read/write large folios support with extended iomap

2025-08-13 Thread 赵南哲
Hi Mr.Christoph, Thanks for the quick feedback! > That's pretty ugly. What additional flags do you need? F2FS can utilize the folio's private field in a non-pointer mode to store its extra flags, which indicate the folio's additional status. Please take a look at the f2fs.h file from PAGE_P

Re: [f2fs-dev] [PATCH v2] f2fs: show the list of donation files

2025-08-13 Thread Jaegeuk Kim via Linux-f2fs-devel
This patch introduces a proc entry to show the currently enrolled donation files. - "File path" indicates a file. - "Status" a. "Donated" means the file is registed in the donation list by fadvise(offset, length, POSIX_FADV_NOREUSE) b. "Evicted" means the donated pages were reclaimed. - "Off

Re: [f2fs-dev] [PATCH 3/3] f2fs/020: do sanity check on i_xattr_nid

2025-08-13 Thread Zorro Lang via Linux-f2fs-devel
On Mon, Aug 11, 2025 at 05:44:15PM +0800, Chao Yu wrote: > This is a regression test: > 1. create directory > 2. add a new xattr entry to create xattr node > 3. use inject.f2fs to inject nid of xattr node w/ ino in a file > 4. check whether f2fs kernel module will detect and report such >corrup

Re: [f2fs-dev] [PATCH 2/3] f2fs/019: do sanity check on mapping table

2025-08-13 Thread Zorro Lang via Linux-f2fs-devel
On Mon, Aug 11, 2025 at 05:44:14PM +0800, Chao Yu wrote: > This is a regression test: > 1. create a file > 2. write file to create a direct node at special offset > 3. use inject.f2fs to inject nid of direct node w/ ino of the inode > 4. check whether f2fs kernel module will detect and report such

[f2fs-dev] [RFC PATCH 1/9] f2fs: Introduce f2fs_iomap_folio_state

2025-08-13 Thread Nanzhe Zhao
Add f2fs's own per-folio structure to track per-block dirty state of a folio. The reason for introducing this structure is that f2fs's private flag would conflict with iomap_folio_state's use of the folio->private field. Thanks to Mr. Matthew for providing the idea. See for details: [https://lore.

[f2fs-dev] [RFC PATCH 6/9] f2fs: Extend f2fs_io_info to support sub-folio ranges

2025-08-13 Thread Nanzhe Zhao
Since f2fs_io_info (hereafter fio) has been converted to use fio->folio and fio->page is deprecated, we must now track which sub-part of a folio is being submitted to a bio in order to support large folios. To achieve this, we add `idx` and `cnt` fields to the fio struct. `fio->idx` represents the

[f2fs-dev] [RFC PATCH 3/9] f2fs: Using `folio_detach_f2fs_private` in invalidate and release folio

2025-08-13 Thread Nanzhe Zhao
Since `folio_detach_f2fs_private` can handle all case for a folio to free it's private date , intergrate it as a subtitute for `folio_detach_private`. Signed-off-by: Nanzhe Zhao --- fs/f2fs/data.c | 13 + 1 file changed, 13 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c

[f2fs-dev] [RFC PATCH 7/9] f2fs:Make GC aware of large folios

2025-08-13 Thread Nanzhe Zhao
Previously, the GC (Garbage Collection) logic for performing I/O and marking folios dirty only supported order-0 folios and lacked awareness of higher-order folios. To enable GC to correctly handle higher-order folios, we made two changes: - In `move_data_page`, we now use `f2fs_iomap_set_range_di

[f2fs-dev] [RFC PATCH 2/9] f2fs: Integrate f2fs_iomap_folio_state into f2fs page private helpers

2025-08-13 Thread Nanzhe Zhao
Integrate f2fs_iomap_folio_state into the f2fs page private helper functions. In these functions, we adopt a two-stage strategy to handle the folio->private field, now supporting both direct bit flags and the new f2fs_iomap_folio_state pointer. Note that my implementation does not rely on checkin

[f2fs-dev] [RFC PATCH 8/9] f2fs: Introduce F2FS_GET_BLOCK_IOMAP and map_blocks he lpers

2025-08-13 Thread Nanzhe Zhao
Introduce the `F2FS_GET_BLOCK_IOMAP` flag for `f2fs_ma p_blocks`. With this flag, holes encountered during buffered I/O iterative mapping can now be merged under `map_is_mergeable`. Furthermor e, when this flag is passed, `f2fs_map_blocks` will by default store the mapped block

[f2fs-dev] [RFC PATCH 5/9] f2fs:Refactor `f2fs_is_compressed_page` to `f2fs_is_compressed_folio`

2025-08-13 Thread Nanzhe Zhao
`f2fs_is_compressed_page` now already accept a folio as a parameter.So the name now is confusing. Rename it to `f2fs_is_compressed_folio`. If a folio has f2fs_iomap_folio_state then it must not be a compressed folio. Signed-off-by: Nanzhe Zhao --- fs/f2fs/compress.c | 11 ++- fs/f2fs/dat

[f2fs-dev] [RFC PATCH 4/9] f2fs: Convert outplace write path page private funcions to folio private functions.

2025-08-13 Thread Nanzhe Zhao
The core function `f2fs_out_place_write` and `__get_segment_type_6` in outplace write path haven't got their legacy page private functions converted which can be harmful for large folios support. Convert them to use our folio private funcions. Signed-off-by: Nanzhe Zhao --- fs/f2

[f2fs-dev] [RFC PATCH 9/9] f2fs: Enable buffered read/write path large folios support for normal and atomic file with iomap

2025-08-13 Thread Nanzhe Zhao
This commit enables large folios support for F2FS's buffered read and write paths. We introduce a helper function `f2fs_set_iomap` to handle all the logic that converts a f2fs_map_blocks to iomap. Currently, compressed files, encrypted files, and fsverity are not supported with iomap large folios

[f2fs-dev] [RESEND RFC PATCH 0/9] f2fs: Enable buffered read/write large folios support with extended iomap

2025-08-13 Thread Nanzhe Zhao
Resend: original patch was misspelling the linux-f2fs-devel@lists.sourceforge.net address. No code changes. This RFC series enable buffered read/write paths large folio support with F2FS-specific extended iomap, combined with some other preparation work for large folio integration. Because this i