The LFS mode is mandatory for host-managed zoned block devices as
update in place optimizations are not possible for segments in
sequential zones.

Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
 fs/f2fs/super.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 2c8a12e..58fd69d 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -518,6 +518,13 @@ static int parse_options(struct super_block *sb, char 
*options)
                                return -ENOMEM;
                        if (strlen(name) == 8 &&
                                        !strncmp(name, "adaptive", 8)) {
+                               if (f2fs_sb_mounted_blkzoned(sb)) {
+                                       f2fs_msg(sb, KERN_WARNING,
+                                                "adaptive mode is not allowed 
with "
+                                                "zoned block device feature");
+                                       kfree(name);
+                                       return -EINVAL;
+                               }
                                set_opt_mode(sbi, F2FS_MOUNT_ADAPTIVE);
                        } else if (strlen(name) == 3 &&
                                        !strncmp(name, "lfs", 3)) {
-- 
2.7.4

Western Digital Corporation (and its subsidiaries) E-mail Confidentiality 
Notice & Disclaimer:

This e-mail and any files transmitted with it may contain confidential or 
legally privileged information of WDC and/or its affiliates, and are intended 
solely for the use of the individual or entity to which they are addressed. If 
you are not the intended recipient, any disclosure, copying, distribution or 
any action taken or omitted to be taken in reliance on it, is prohibited. If 
you have received this e-mail in error, please notify the sender immediately 
and delete the e-mail in its entirety from your system.


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to