All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@wdc.com>
To: jaegeuk@kernel.org, yuchao0@huawei.com
Cc: Damien Le Moal <damien.lemoal@wdc.com>,
	Shaun Tancheff <shaun@tancheff.com>,
	Hannes Reinecke <hare@suse.de>,
	linux-f2fs-devel@lists.sourceforge.net
Subject: [PATCH 7/7] fsck.f2fs: Check BLKZONED feature on mount
Date: Fri, 28 Oct 2016 16:57:04 +0900	[thread overview]
Message-ID: <1477641424-12367-9-git-send-email-damien.lemoal@wdc.com> (raw)
In-Reply-To: <1477641424-12367-1-git-send-email-damien.lemoal@wdc.com>

The BLKZONED feature is mandatory for host-managed zoned block
devices. So check that it is set.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 fsck/mount.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fsck/mount.c b/fsck/mount.c
index dead207..6e27a5b 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -394,6 +394,13 @@ int sanity_check_raw_super(struct f2fs_super_block *sb, u64 offset)
 					get_sb(root_ino) != 3)
 		return -1;
 
+	/* Check zoned block device feature */
+	if (config.zoned_model == F2FS_ZONED_HM &&
+	    (!(sb->feature & cpu_to_le32(F2FS_FEATURE_BLKZONED)))) {
+		MSG(0, "\tMissing zoned block device feature\n");
+		return -1;
+	}
+
 	if (sanity_check_area_boundary(sb, offset))
 		return -1;
 	return 0;
-- 
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

  parent reply	other threads:[~2016-10-28  8:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28  7:56 [PATCH 0/7] f2fs-tools: zoned block device support Damien Le Moal
2016-10-28  7:56 ` [PATCH 1/7] f2fs-tools: Add executable files to .gitignore Damien Le Moal
2016-10-28  7:56 ` [PATCH 1/7] Gitignore: add executable files Damien Le Moal
2016-10-28  7:56 ` [PATCH 2/7] f2fs-tools: Use zoned block device terminology Damien Le Moal
2016-10-28  7:57 ` [PATCH 3/7] f2fs-tools: Introduce support for zoned block devices Damien Le Moal
2016-10-28  7:57 ` [PATCH 4/7] mkfs.f2fs: Check options " Damien Le Moal
2016-10-28  7:57 ` [PATCH 5/7] mkfs.f2fs: Reset sequential zones on device discard Damien Le Moal
2016-10-28  7:57 ` [PATCH 6/7] mkfs.f2fs: Check zoned block devices configuration Damien Le Moal
2016-10-28  7:57 ` Damien Le Moal [this message]
2016-11-01  3:46 ` [PATCH 0/7] f2fs-tools: zoned block device support Jaegeuk Kim
2016-11-01  8:25   ` Damien Le Moal
2016-11-01 18:22     ` Jaegeuk Kim

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=1477641424-12367-9-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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.