summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2016-10-28 11:45:04 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2016-11-23 23:11:20 +0300
commit3adc57e97792e4ac9f228bde802829e2e9840afe (patch)
treeb457850dd622ace0f88cabbfa73804f7b7761d97 /fs/f2fs/super.c
parent96ba2decb4241aa2c6b61cfc8489d648769eff99 (diff)
downloadlinux-3adc57e97792e4ac9f228bde802829e2e9840afe.tar.xz
f2fs: Do not allow adaptive mode for host-managed zoned block devices
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.lemoal@wdc.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 7bb0b36ae5e6..3312284aa245 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)) {