* [f2fs-dev] [PATCH v2] f2fs: add compression feature check for all compress mount opt
@ 2023-03-19 7:51 Yangtao Li via Linux-f2fs-devel
2023-03-26 14:00 ` Chao Yu
2023-03-27 16:00 ` patchwork-bot+f2fs
0 siblings, 2 replies; 3+ messages in thread
From: Yangtao Li via Linux-f2fs-devel @ 2023-03-19 7:51 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu; +Cc: linux-f2fs-devel, linux-kernel, Yangtao Li
Opt_compress_chksum, Opt_compress_mode and Opt_compress_cache
lack the necessary check to see if the image supports compression,
let's add it.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
v2:
-drop f2fs_mount_opt_need_skip()
fs/f2fs/super.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 9c87d91df61b..a88706bbfc0d 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1179,9 +1179,17 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
kfree(name);
break;
case Opt_compress_chksum:
+ if (!f2fs_sb_has_compression(sbi)) {
+ f2fs_info(sbi, "Image doesn't support compression");
+ break;
+ }
F2FS_OPTION(sbi).compress_chksum = true;
break;
case Opt_compress_mode:
+ if (!f2fs_sb_has_compression(sbi)) {
+ f2fs_info(sbi, "Image doesn't support compression");
+ break;
+ }
name = match_strdup(&args[0]);
if (!name)
return -ENOMEM;
@@ -1196,6 +1204,10 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
kfree(name);
break;
case Opt_compress_cache:
+ if (!f2fs_sb_has_compression(sbi)) {
+ f2fs_info(sbi, "Image doesn't support compression");
+ break;
+ }
set_opt(sbi, COMPRESS_CACHE);
break;
#else
--
2.35.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: add compression feature check for all compress mount opt
2023-03-19 7:51 [f2fs-dev] [PATCH v2] f2fs: add compression feature check for all compress mount opt Yangtao Li via Linux-f2fs-devel
@ 2023-03-26 14:00 ` Chao Yu
2023-03-27 16:00 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2023-03-26 14:00 UTC (permalink / raw)
To: Yangtao Li, Jaegeuk Kim; +Cc: linux-kernel, linux-f2fs-devel
On 2023/3/19 15:51, Yangtao Li wrote:
> Opt_compress_chksum, Opt_compress_mode and Opt_compress_cache
> lack the necessary check to see if the image supports compression,
> let's add it.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
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: add compression feature check for all compress mount opt
2023-03-19 7:51 [f2fs-dev] [PATCH v2] f2fs: add compression feature check for all compress mount opt Yangtao Li via Linux-f2fs-devel
2023-03-26 14:00 ` Chao Yu
@ 2023-03-27 16:00 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs @ 2023-03-27 16:00 UTC (permalink / raw)
To: Yangtao Li; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Sun, 19 Mar 2023 15:51:30 +0800 you wrote:
> Opt_compress_chksum, Opt_compress_mode and Opt_compress_cache
> lack the necessary check to see if the image supports compression,
> let's add it.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> v2:
> -drop f2fs_mount_opt_need_skip()
> fs/f2fs/super.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
Here is the summary with links:
- [f2fs-dev,v2] f2fs: add compression feature check for all compress mount opt
https://git.kernel.org/jaegeuk/f2fs/c/2f3d837dbaa0
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-03-27 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-19 7:51 [f2fs-dev] [PATCH v2] f2fs: add compression feature check for all compress mount opt Yangtao Li via Linux-f2fs-devel
2023-03-26 14:00 ` Chao Yu
2023-03-27 16:00 ` 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).