]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
f2fs: show the list of donation files
authorJaegeuk Kim <jaegeuk@kernel.org>
Mon, 11 Aug 2025 23:50:25 +0000 (23:50 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 20 Aug 2025 17:45:00 +0000 (17:45 +0000)
commitf1a49c1b112b899643b01a5b86cf642a09a01cb6
tree0259eb1465ee4bde7c7d3435776fc8d5b11eca84
parentff11d8701b77e303593fd86cf9ef74ef3ac4048e
f2fs: show the list of donation files

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.
- "Offset (kb)" and "Length (kb) show the registered donation range.
- "Cached pages (kb)" shows the amount of cached pages in the inode page cache.

For example,

 # of files  : 2
 File path                                              Status Donation offset (kb)   Donation size (kb)  File cached size (kb)
---
 /local/test2                                          Donated                    0              1048576                2097152
 /local/test                                           Evicted                    0              1048576                1048576

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/sysfs.c