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>
This commit is contained in:
parent
789098ffdd
commit
02bccb0633
1 changed files with 7 additions and 0 deletions
|
@ -518,6 +518,13 @@ static int parse_options(struct super_block *sb, char *options)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
if (strlen(name) == 8 &&
|
if (strlen(name) == 8 &&
|
||||||
!strncmp(name, "adaptive", 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);
|
set_opt_mode(sbi, F2FS_MOUNT_ADAPTIVE);
|
||||||
} else if (strlen(name) == 3 &&
|
} else if (strlen(name) == 3 &&
|
||||||
!strncmp(name, "lfs", 3)) {
|
!strncmp(name, "lfs", 3)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue