From: Daeho Jeong <daeho43@gmail.com>
To: linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: Daeho Jeong <daehojeong@google.com>
Subject: [PATCH] f2fs: expose subpage_block feature via sysfs
Date: Wed, 2 Dec 2026 13:45:35 -0800 [thread overview]
Message-ID: <20261202214535.972456-1-daeho43@gmail.com> (raw)
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
next reply other threads:[~2026-12-02 21:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 21:45 Daeho Jeong [this message]
2026-12-03 3:10 ` [f2fs-dev] " Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202214535.972456-1-daeho43@gmail.com \
--to=daeho43@gmail.com \
--cc=daehojeong@google.com \
--cc=kernel-team@android.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®