All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: expose resizable_tail feature via sysfs
@ 2026-10-14 15:21 ` Daeho Jeong
  0 siblings, 0 replies; 4+ messages in thread
From: Daeho Jeong @ 2026-10-14 15:21 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel, kernel-team; +Cc: Daeho Jeong, stable

From: Daeho Jeong <daehojeong@google.com>

Userspace has no way to know whether the kernel supports the
resizable_tail_secno mount option before mounting. Passing it to a
kernel without the support fails the mount with -EINVAL, and checking
/sys/fs/f2fs/<disk>/pinned_area_max_secno requires an f2fs instance
to be mounted already.

Export /sys/fs/f2fs/features/resizable_tail so that userspace can check
the support before formatting or mounting a filesystem that relies on
resizable_tail_secno, e.g. a filesystem whose tail is going to be shrunk
online later.

Fixes: c966d29e01bb ("f2fs: support resizable tail section and unify pinned allocation")
Cc: stable@vger.kernel.org
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 c4746c416ac..8df18b5d479 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.
+		fserror, resizable_tail.
 
 What:		/sys/fs/f2fs/<disk>/inject_rate
 Date:		May 2016
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9749da70089..8b844a8b0bf 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1421,6 +1421,7 @@ F2FS_FEATURE_RO_ATTR(linear_lookup);
 #endif
 F2FS_FEATURE_RO_ATTR(packed_ssa);
 F2FS_FEATURE_RO_ATTR(fserror);
+F2FS_FEATURE_RO_ATTR(resizable_tail);
 
 #define ATTR_LIST(name) (&f2fs_attr_##name.attr)
 static struct attribute *f2fs_attrs[] = {
@@ -1592,6 +1593,7 @@ static struct attribute *f2fs_feat_attrs[] = {
 #endif
 	BASE_ATTR_LIST(packed_ssa),
 	BASE_ATTR_LIST(fserror),
+	BASE_ATTR_LIST(resizable_tail),
 	NULL,
 };
 ATTRIBUTE_GROUPS(f2fs_feat);
-- 
2.56.0.385.gd3acb90ef8-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [f2fs-dev] [PATCH] f2fs: expose resizable_tail feature via sysfs
@ 2026-10-14 15:21 ` Daeho Jeong
  0 siblings, 0 replies; 4+ messages in thread
From: Daeho Jeong @ 2026-10-14 15:21 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel, kernel-team; +Cc: Daeho Jeong, stable

From: Daeho Jeong <daehojeong@google.com>

Userspace has no way to know whether the kernel supports the
resizable_tail_secno mount option before mounting. Passing it to a
kernel without the support fails the mount with -EINVAL, and checking
/sys/fs/f2fs/<disk>/pinned_area_max_secno requires an f2fs instance
to be mounted already.

Export /sys/fs/f2fs/features/resizable_tail so that userspace can check
the support before formatting or mounting a filesystem that relies on
resizable_tail_secno, e.g. a filesystem whose tail is going to be shrunk
online later.

Fixes: c966d29e01bb ("f2fs: support resizable tail section and unify pinned allocation")
Cc: stable@vger.kernel.org
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 c4746c416ac..8df18b5d479 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.
+		fserror, resizable_tail.
 
 What:		/sys/fs/f2fs/<disk>/inject_rate
 Date:		May 2016
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9749da70089..8b844a8b0bf 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1421,6 +1421,7 @@ F2FS_FEATURE_RO_ATTR(linear_lookup);
 #endif
 F2FS_FEATURE_RO_ATTR(packed_ssa);
 F2FS_FEATURE_RO_ATTR(fserror);
+F2FS_FEATURE_RO_ATTR(resizable_tail);
 
 #define ATTR_LIST(name) (&f2fs_attr_##name.attr)
 static struct attribute *f2fs_attrs[] = {
@@ -1592,6 +1593,7 @@ static struct attribute *f2fs_feat_attrs[] = {
 #endif
 	BASE_ATTR_LIST(packed_ssa),
 	BASE_ATTR_LIST(fserror),
+	BASE_ATTR_LIST(resizable_tail),
 	NULL,
 };
 ATTRIBUTE_GROUPS(f2fs_feat);
-- 
2.56.0.385.gd3acb90ef8-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] f2fs: expose resizable_tail feature via sysfs
  2026-10-14 15:21 ` [f2fs-dev] " Daeho Jeong
@ 2026-10-14 21:03   ` Daeho Jeong
  -1 siblings, 0 replies; 4+ messages in thread
From: Daeho Jeong @ 2026-10-14 21:03 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel, kernel-team
  Cc: Daeho Jeong, stable, Daniel Zheng

+ cc: zhengdaniel@google.com

On Wed, Oct 14, 2026 at 8:21 AM Daeho Jeong <daeho43@gmail.com> wrote:
>
> From: Daeho Jeong <daehojeong@google.com>
>
> Userspace has no way to know whether the kernel supports the
> resizable_tail_secno mount option before mounting. Passing it to a
> kernel without the support fails the mount with -EINVAL, and checking
> /sys/fs/f2fs/<disk>/pinned_area_max_secno requires an f2fs instance
> to be mounted already.
>
> Export /sys/fs/f2fs/features/resizable_tail so that userspace can check
> the support before formatting or mounting a filesystem that relies on
> resizable_tail_secno, e.g. a filesystem whose tail is going to be shrunk
> online later.
>
> Fixes: c966d29e01bb ("f2fs: support resizable tail section and unify pinned allocation")
> Cc: stable@vger.kernel.org
> 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 c4746c416ac..8df18b5d479 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.
> +               fserror, resizable_tail.
>
>  What:          /sys/fs/f2fs/<disk>/inject_rate
>  Date:          May 2016
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 9749da70089..8b844a8b0bf 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -1421,6 +1421,7 @@ F2FS_FEATURE_RO_ATTR(linear_lookup);
>  #endif
>  F2FS_FEATURE_RO_ATTR(packed_ssa);
>  F2FS_FEATURE_RO_ATTR(fserror);
> +F2FS_FEATURE_RO_ATTR(resizable_tail);
>
>  #define ATTR_LIST(name) (&f2fs_attr_##name.attr)
>  static struct attribute *f2fs_attrs[] = {
> @@ -1592,6 +1593,7 @@ static struct attribute *f2fs_feat_attrs[] = {
>  #endif
>         BASE_ATTR_LIST(packed_ssa),
>         BASE_ATTR_LIST(fserror),
> +       BASE_ATTR_LIST(resizable_tail),
>         NULL,
>  };
>  ATTRIBUTE_GROUPS(f2fs_feat);
> --
> 2.56.0.385.gd3acb90ef8-goog
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: expose resizable_tail feature via sysfs
@ 2026-10-14 21:03   ` Daeho Jeong
  0 siblings, 0 replies; 4+ messages in thread
From: Daeho Jeong @ 2026-10-14 21:03 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel, kernel-team
  Cc: Daeho Jeong, stable, Daniel Zheng

+ cc: zhengdaniel@google.com

On Wed, Oct 14, 2026 at 8:21 AM Daeho Jeong <daeho43@gmail.com> wrote:
>
> From: Daeho Jeong <daehojeong@google.com>
>
> Userspace has no way to know whether the kernel supports the
> resizable_tail_secno mount option before mounting. Passing it to a
> kernel without the support fails the mount with -EINVAL, and checking
> /sys/fs/f2fs/<disk>/pinned_area_max_secno requires an f2fs instance
> to be mounted already.
>
> Export /sys/fs/f2fs/features/resizable_tail so that userspace can check
> the support before formatting or mounting a filesystem that relies on
> resizable_tail_secno, e.g. a filesystem whose tail is going to be shrunk
> online later.
>
> Fixes: c966d29e01bb ("f2fs: support resizable tail section and unify pinned allocation")
> Cc: stable@vger.kernel.org
> 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 c4746c416ac..8df18b5d479 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.
> +               fserror, resizable_tail.
>
>  What:          /sys/fs/f2fs/<disk>/inject_rate
>  Date:          May 2016
> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
> index 9749da70089..8b844a8b0bf 100644
> --- a/fs/f2fs/sysfs.c
> +++ b/fs/f2fs/sysfs.c
> @@ -1421,6 +1421,7 @@ F2FS_FEATURE_RO_ATTR(linear_lookup);
>  #endif
>  F2FS_FEATURE_RO_ATTR(packed_ssa);
>  F2FS_FEATURE_RO_ATTR(fserror);
> +F2FS_FEATURE_RO_ATTR(resizable_tail);
>
>  #define ATTR_LIST(name) (&f2fs_attr_##name.attr)
>  static struct attribute *f2fs_attrs[] = {
> @@ -1592,6 +1593,7 @@ static struct attribute *f2fs_feat_attrs[] = {
>  #endif
>         BASE_ATTR_LIST(packed_ssa),
>         BASE_ATTR_LIST(fserror),
> +       BASE_ATTR_LIST(resizable_tail),
>         NULL,
>  };
>  ATTRIBUTE_GROUPS(f2fs_feat);
> --
> 2.56.0.385.gd3acb90ef8-goog
>


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-14 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 15:21 [PATCH] f2fs: expose resizable_tail feature via sysfs Daeho Jeong
2026-10-14 15:21 ` [f2fs-dev] " Daeho Jeong
2026-10-14 21:03 ` Daeho Jeong
2026-10-14 21:03   ` [f2fs-dev] " Daeho Jeong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.