From: Bart Van Assche <bvanassche@acm.org>
To: John Pittman <jpittman@redhat.com>, axboe@kernel.dk
Cc: linux-block@vger.kernel.org, loberman@redhat.com
Subject: Re: [PATCH v2] null_blk: add zoned config support information
Date: Fri, 04 Jan 2019 13:49:38 -0800 [thread overview]
Message-ID: <1546638578.83374.6.camel@acm.org> (raw)
In-Reply-To: <20190104170637.8218-1-jpittman@redhat.com>
On Fri, 2019-01-04 at 12:06 -0500, John Pittman wrote:
> If the kernel is built without CONFIG_BLK_DEV_ZONED, a modprobe
> of the null_blk driver with zoned=1 fails with 'Invalid argument'.
> This can be confusing to users, prompting a search as to why the
> parameter is invalid. To assist in that search, add a bit more
> information to the failure, additionally adding to the documentation
> that CONFIG_BLK_DEV_ZONED is needed for zoned=1.
>
> Signed-off-by: John Pittman <jpittman@redhat.com>
> ---
> Documentation/block/null_blk.txt | 3 ++-
> drivers/block/null_blk.h | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/block/null_blk.txt b/Documentation/block/null_blk.txt
> index ea2dafe49ae8..4cad1024fff7 100644
> --- a/Documentation/block/null_blk.txt
> +++ b/Documentation/block/null_blk.txt
> @@ -88,7 +88,8 @@ shared_tags=[0/1]: Default: 0
>
> zoned=[0/1]: Default: 0
> 0: Block device is exposed as a random-access block device.
> - 1: Block device is exposed as a host-managed zoned block device.
> + 1: Block device is exposed as a host-managed zoned block device. Requires
> + CONFIG_BLK_DEV_ZONED.
>
> zone_size=[MB]: Default: 256
> Per zone size when exposed as a zoned block device. Must be a power of two.
> diff --git a/drivers/block/null_blk.h b/drivers/block/null_blk.h
> index b3df2793e7cd..cab4808f14bd 100644
> --- a/drivers/block/null_blk.h
> +++ b/drivers/block/null_blk.h
> @@ -97,6 +97,7 @@ void null_zone_reset(struct nullb_cmd *cmd, sector_t sector);
> #else
> static inline int null_zone_init(struct nullb_device *dev)
> {
> + pr_err("CONFIG_BLK_DEV_ZONED not enabled\n");
> return -EINVAL;
> }
> static inline void null_zone_exit(struct nullb_device *dev) {}
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
next prev parent reply other threads:[~2019-01-04 21:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-04 17:06 [PATCH v2] null_blk: add zoned config support information John Pittman
2019-01-04 21:49 ` Bart Van Assche [this message]
2019-01-05 12:44 ` John Pittman
2019-01-06 17:58 ` Jens Axboe
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=1546638578.83374.6.camel@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=jpittman@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=loberman@redhat.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).