[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 4/4] raw: Don't open ZBDs if backend can't ha
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v5 4/4] raw: Don't open ZBDs if backend can't handle them |
Date: |
Wed, 28 Aug 2019 10:38:34 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Fri, Aug 23, 2019 at 03:49:27PM -0400, Dmitry Fomichev wrote:
> diff --git a/block/file-posix.c b/block/file-posix.c
> index d9f2fc5e46..090e7c4d2f 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -2884,6 +2884,20 @@ static int raw_check_perm(BlockDriverState *bs,
> uint64_t perm, uint64_t shared,
> goto fail;
> }
> }
> +
> + /*
> + * If we are opening a zoned block device, check if the backend
> + * driver can properly handle such devices, abort if not.
> + */
> + if (bdrv_is_zoned(bs) &&
> + (shared & BLK_PERM_SUPPORT_ZONED) &&
> + !(perm & BLK_PERM_SUPPORT_ZONED)) {
> + error_setg(errp,
> + "block backend driver doesn't support HM zoned devices");
Spelling out "host-managed" would be helpful in the error message. Web
search results for "hm zoned" and "hm zoned devices" aren't great,
whereas "host-managed zoned" brings up the T10 page.
> + ret = -ENOTSUP;
> + goto fail;
> + }
> +
> return 0;
>
> fail:
> diff --git a/hw/block/fdc.c b/hw/block/fdc.c
> index c5f41b3eb6..673a8b39bc 100644
> --- a/hw/block/fdc.c
> +++ b/hw/block/fdc.c
> @@ -570,7 +570,7 @@ static void floppy_drive_realize(DeviceState *qdev, Error
> **errp)
> dev->conf.werror = BLOCKDEV_ON_ERROR_AUTO;
>
> if (!blkconf_apply_backend_options(&dev->conf, read_only, false, false,
> - errp)) {
> + errp)) {
Please squash this whitespace change into the previous patch where the
false argument was first introduced.
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH v5 0/4] virtio/block: handle zoned backing devices, Dmitry Fomichev, 2019/08/23
- [Qemu-devel] [PATCH v5 4/4] raw: Don't open ZBDs if backend can't handle them, Dmitry Fomichev, 2019/08/23
- Re: [Qemu-devel] [PATCH v5 4/4] raw: Don't open ZBDs if backend can't handle them,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v5 1/4] block: Add zoned device model property, Dmitry Fomichev, 2019/08/23
- [Qemu-devel] [PATCH v5 3/4] block/ide/scsi: Set BLK_PERM_SUPPORT_ZONED, Dmitry Fomichev, 2019/08/23
- [Qemu-devel] [PATCH v5 2/4] raw: Recognize zoned backing devices, Dmitry Fomichev, 2019/08/23
- Re: [Qemu-devel] [PATCH v5 0/4] virtio/block: handle zoned backing devices, no-reply, 2019/08/23
- Re: [Qemu-devel] [Qemu-block] [PATCH v5 0/4] virtio/block: handle zoned backing devices, Stefan Hajnoczi, 2019/08/28