* [f2fs-dev] [PATCH v2] f2fs: Only lfs mode is allowed with zoned block device feature
@ 2023-08-03 14:28 Chunhai Guo via Linux-f2fs-devel
2023-08-04 3:45 ` Chao Yu
2023-08-14 20:50 ` patchwork-bot+f2fs
0 siblings, 2 replies; 3+ messages in thread
From: Chunhai Guo via Linux-f2fs-devel @ 2023-08-03 14:28 UTC (permalink / raw)
To: chao, jaegeuk; +Cc: Chunhai Guo, linux-f2fs-devel
Now f2fs support four block allocation modes: lfs, adaptive,
fragment:segment, fragment:block. Only lfs mode is allowed with zoned block
device feature.
Signed-off-by: Chunhai Guo <guochunhai@vivo.com>
---
fs/f2fs/super.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 30883beb750a..26add77f9062 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -862,11 +862,6 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
if (!name)
return -ENOMEM;
if (!strcmp(name, "adaptive")) {
- if (f2fs_sb_has_blkzoned(sbi)) {
- f2fs_warn(sbi, "adaptive mode is not allowed with zoned block device feature");
- kfree(name);
- return -EINVAL;
- }
F2FS_OPTION(sbi).fs_mode = FS_MODE_ADAPTIVE;
} else if (!strcmp(name, "lfs")) {
F2FS_OPTION(sbi).fs_mode = FS_MODE_LFS;
@@ -1331,6 +1326,11 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
F2FS_OPTION(sbi).discard_unit =
DISCARD_UNIT_SECTION;
}
+
+ if (F2FS_OPTION(sbi).fs_mode != FS_MODE_LFS) {
+ f2fs_info(sbi, "Only lfs mode is allowed with zoned block device feature");
+ return -EINVAL;
+ }
#else
f2fs_err(sbi, "Zoned block device support is not enabled");
return -EINVAL;
--
2.25.1
_______________________________________________
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] 3+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: Only lfs mode is allowed with zoned block device feature
2023-08-03 14:28 [f2fs-dev] [PATCH v2] f2fs: Only lfs mode is allowed with zoned block device feature Chunhai Guo via Linux-f2fs-devel
@ 2023-08-04 3:45 ` Chao Yu
2023-08-14 20:50 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2023-08-04 3:45 UTC (permalink / raw)
To: Chunhai Guo, jaegeuk; +Cc: linux-f2fs-devel
On 2023/8/3 22:28, Chunhai Guo wrote:
> Now f2fs support four block allocation modes: lfs, adaptive,
> fragment:segment, fragment:block. Only lfs mode is allowed with zoned block
> device feature.
>
Fixes: 6691d940b0e0 ("f2fs: introduce fragment allocation mode mount option")
Otherwise, it looks good to me.
Thanks,
> Signed-off-by: Chunhai Guo <guochunhai@vivo.com>
> ---
> fs/f2fs/super.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 30883beb750a..26add77f9062 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -862,11 +862,6 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
> if (!name)
> return -ENOMEM;
> if (!strcmp(name, "adaptive")) {
> - if (f2fs_sb_has_blkzoned(sbi)) {
> - f2fs_warn(sbi, "adaptive mode is not allowed with zoned block device feature");
> - kfree(name);
> - return -EINVAL;
> - }
> F2FS_OPTION(sbi).fs_mode = FS_MODE_ADAPTIVE;
> } else if (!strcmp(name, "lfs")) {
> F2FS_OPTION(sbi).fs_mode = FS_MODE_LFS;
> @@ -1331,6 +1326,11 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
> F2FS_OPTION(sbi).discard_unit =
> DISCARD_UNIT_SECTION;
> }
> +
> + if (F2FS_OPTION(sbi).fs_mode != FS_MODE_LFS) {
> + f2fs_info(sbi, "Only lfs mode is allowed with zoned block device feature");
> + return -EINVAL;
> + }
> #else
> f2fs_err(sbi, "Zoned block device support is not enabled");
> return -EINVAL;
_______________________________________________
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] 3+ messages in thread
* Re: [f2fs-dev] [PATCH v2] f2fs: Only lfs mode is allowed with zoned block device feature
2023-08-03 14:28 [f2fs-dev] [PATCH v2] f2fs: Only lfs mode is allowed with zoned block device feature Chunhai Guo via Linux-f2fs-devel
2023-08-04 3:45 ` Chao Yu
@ 2023-08-14 20:50 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs @ 2023-08-14 20:50 UTC (permalink / raw)
To: Chunhai Guo; +Cc: jaegeuk, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Thu, 3 Aug 2023 22:28:42 +0800 you wrote:
> Now f2fs support four block allocation modes: lfs, adaptive,
> fragment:segment, fragment:block. Only lfs mode is allowed with zoned block
> device feature.
>
> Signed-off-by: Chunhai Guo <guochunhai@vivo.com>
> ---
> fs/f2fs/super.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Here is the summary with links:
- [f2fs-dev,v2] f2fs: Only lfs mode is allowed with zoned block device feature
https://git.kernel.org/jaegeuk/f2fs/c/2bd4df8fcbc7
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
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] 3+ messages in thread
end of thread, other threads:[~2023-08-14 20:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-03 14:28 [f2fs-dev] [PATCH v2] f2fs: Only lfs mode is allowed with zoned block device feature Chunhai Guo via Linux-f2fs-devel
2023-08-04 3:45 ` Chao Yu
2023-08-14 20:50 ` 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;
as well as URLs for NNTP newsgroup(s).