From: Damien Le Moal <damien.lemoal@wdc.com>
To: jaegeuk@kernel.org, yuchao0@huawei.com
Cc: linux-fsdevel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Hannes Reinecke <hare@suse.de>,
Shaun Tancheff <shaun@tancheff.com>,
Damien Le Moal <damien.lemoal@wdc.com>
Subject: [PATCH 6/9] f2fs: Do not allow adaptive mode for host-managed zoned block devices
Date: Fri, 28 Oct 2016 16:55:34 +0900 [thread overview]
Message-ID: <1477641337-12321-7-git-send-email-damien.lemoal@wdc.com> (raw)
In-Reply-To: <1477641337-12321-1-git-send-email-damien.lemoal@wdc.com>
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>
---
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
next prev parent reply other threads:[~2016-10-28 7:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 7:55 [PATCH 0/9] f2fs: Zoned block device support Damien Le Moal
2016-10-28 7:55 ` [PATCH 1/9] f2fs: Add missing break in switch-case Damien Le Moal
2016-10-28 7:55 ` [PATCH 2/9] f2fs: Use generic zoned block device terminology Damien Le Moal
2016-10-28 7:55 ` [PATCH 3/9] f2fs: Check zoned block feature for host-managed zoned block devices Damien Le Moal
2016-10-28 7:55 ` [PATCH 4/9] f2fs: Suppress discard warning message for " Damien Le Moal
2016-10-28 7:55 ` [PATCH 5/9] f2fs: Always enable discard for zoned blocks devices Damien Le Moal
2016-10-28 7:55 ` Damien Le Moal [this message]
2016-10-28 7:55 ` [PATCH 7/9] f2fs: Cache zoned block devices zone type Damien Le Moal
2016-10-28 8:48 ` kbuild test robot
2016-10-28 7:55 ` [PATCH 8/9] f2fs: Reset sequential zones on zoned block devices Damien Le Moal
2016-10-28 8:19 ` kbuild test robot
2016-10-28 9:02 ` kbuild test robot
2016-10-28 9:38 ` kbuild test robot
2016-10-28 7:55 ` [PATCH 9/9] f2fs: Trace reset zone events Damien Le Moal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477641337-12321-7-git-send-email-damien.lemoal@wdc.com \
--to=damien.lemoal@wdc.com \
--cc=hare@suse.de \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=shaun@tancheff.com \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).