* [PATCH] f2fs: expose subpage_block feature via sysfs
@ 2026-12-02 21:45 Daeho Jeong
2026-12-03 3:10 ` [f2fs-dev] " Chao Yu
2026-12-03 23:20 ` patchwork-bot+f2fs
0 siblings, 2 replies; 3+ messages in thread
From: Daeho Jeong @ 2026-12-02 21:45 UTC (permalink / raw)
To: linux-kernel, linux-f2fs-devel, kernel-team; +Cc: Daeho Jeong
From: Daeho Jeong <daehojeong@google.com>
f2fs can mount a filesystem whose block size is smaller than the page
size, down to 4KB. A kernel without this support rejects such a
filesystem at mount time, and userspace has no way to tell the two
apart. A tool that formats a device needs to know it before picking the
block size, e.g. to choose between 4KB and 16KB blocks on a 16KB page
kernel.
Add /sys/fs/f2fs/features/subpage_block, so that userspace can check
whether the running kernel supports a block size smaller than the page
size.
Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
Documentation/ABI/testing/sysfs-fs-f2fs | 2 +-
fs/f2fs/sysfs.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
index e7e968c6df92..33948ebc560c 100644
--- a/Documentation/ABI/testing/sysfs-fs-f2fs
+++ b/Documentation/ABI/testing/sysfs-fs-f2fs
@@ -271,7 +271,7 @@ Description: Shows all enabled kernel features.
inode_crtime, lost_found, verity, sb_checksum,
casefold, readonly, compression, test_dummy_encryption_v2,
atomic_write, pin_file, encrypted_casefold, linear_lookup,
- fserror, metadata_cache, resizable_tail.
+ fserror, metadata_cache, resizable_tail, subpage_block.
What: /sys/fs/f2fs/<disk>/inject_rate
Date: May 2016
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 430356e500af..1325985e8df7 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1428,6 +1428,7 @@ F2FS_FEATURE_RO_ATTR(packed_ssa);
F2FS_FEATURE_RO_ATTR(fserror);
F2FS_FEATURE_RO_ATTR(metadata_cache);
F2FS_FEATURE_RO_ATTR(resizable_tail);
+F2FS_FEATURE_RO_ATTR(subpage_block);
#define ATTR_LIST(name) (&f2fs_attr_##name.attr)
static struct attribute *f2fs_attrs[] = {
@@ -1604,6 +1605,7 @@ static struct attribute *f2fs_feat_attrs[] = {
BASE_ATTR_LIST(fserror),
BASE_ATTR_LIST(metadata_cache),
BASE_ATTR_LIST(resizable_tail),
+ BASE_ATTR_LIST(subpage_block),
NULL,
};
ATTRIBUTE_GROUPS(f2fs_feat);
--
2.56.1.915.g69d5ec7298-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: expose subpage_block feature via sysfs
2026-12-02 21:45 [PATCH] f2fs: expose subpage_block feature via sysfs Daeho Jeong
@ 2026-12-03 3:10 ` Chao Yu
2026-12-03 23:20 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2026-12-03 3:10 UTC (permalink / raw)
To: Daeho Jeong, linux-kernel, linux-f2fs-devel, kernel-team
Cc: chao, Daeho Jeong
On 12/3/26 05:45, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> f2fs can mount a filesystem whose block size is smaller than the page
> size, down to 4KB. A kernel without this support rejects such a
> filesystem at mount time, and userspace has no way to tell the two
> apart. A tool that formats a device needs to know it before picking the
> block size, e.g. to choose between 4KB and 16KB blocks on a 16KB page
> kernel.
>
> Add /sys/fs/f2fs/features/subpage_block, so that userspace can check
> whether the running kernel supports a block size smaller than the page
> size.
>
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: expose subpage_block feature via sysfs
2026-12-02 21:45 [PATCH] f2fs: expose subpage_block feature via sysfs Daeho Jeong
2026-12-03 3:10 ` [f2fs-dev] " Chao Yu
@ 2026-12-03 23:20 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs @ 2026-12-03 23:20 UTC (permalink / raw)
To: Daeho Jeong; +Cc: linux-kernel, linux-f2fs-devel, kernel-team, daehojeong
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Wed, 2 Dec 2026 13:45:35 -0800 you wrote:
> From: Daeho Jeong <daehojeong@google.com>
>
> f2fs can mount a filesystem whose block size is smaller than the page
> size, down to 4KB. A kernel without this support rejects such a
> filesystem at mount time, and userspace has no way to tell the two
> apart. A tool that formats a device needs to know it before picking the
> block size, e.g. to choose between 4KB and 16KB blocks on a 16KB page
> kernel.
>
> [...]
Here is the summary with links:
- [f2fs-dev] f2fs: expose subpage_block feature via sysfs
https://git.kernel.org/jaegeuk/f2fs/c/da17865fca96
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-03 23:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 21:45 [PATCH] f2fs: expose subpage_block feature via sysfs Daeho Jeong
2026-12-03 3:10 ` [f2fs-dev] " Chao Yu
2026-12-03 23:20 ` patchwork-bot+f2fs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox