[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/4] virtio: handle zoned backing devices
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 0/4] virtio: handle zoned backing devices |
Date: |
Wed, 10 Jul 2019 13:33:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 |
On 10/07/19 13:02, Kevin Wolf wrote:
> Hm... Actually, file-posix implements .bdrv_check_perm and could just
> refuse attaching a parent there if it doesn't request a specific
> permission like BLK_PERM_SUPPORT_ZONED. That should give us the
> whitelist semantics through existing infrastructure.
I'd like Dmitry to have something more precise to base his work on. The
permissions system is really complicated and I never really wrapped my
head around it, so I need your help.
IIUC, blkconf_apply_backend_options would grow a new argument (like
"resizable") and that argument would add BLK_PERM_SUPPORT_ZONED to the
perm that blkconf_apply_backend_options passes to blk_set_perm. On the
other side raw_check_perm would say something like
if (is_zoned(s) && !(perm & BLK_PERM_SUPPORT_ZONED)) {
error_setg(....);
return -ENOTSUP;
}
Is this correct?
In addition, BLK_PERM_SUPPORT_ZONED would have to be a shared
permission, since it's possible to assign the same block device to
multiple scsi-block devices. So BLK_PERM_SUPPORT_ZONED would be added
unconditionally to shared_perm.
Paolo
ps: I have always thought that shared_perm is expressed the wrong way
and should have been "denied_perm". How hard would it be to change that
now?
- [Qemu-devel] [PATCH 0/4] virtio: handle zoned backing devices, Dmitry Fomichev, 2019/07/09
- [Qemu-devel] [PATCH 1/4] block: Add zoned device model property, Dmitry Fomichev, 2019/07/09
- [Qemu-devel] [PATCH 3/4] virtio-blk: Don't realize zoned block devices, Dmitry Fomichev, 2019/07/09
- [Qemu-devel] [PATCH 2/4] raw: Recognize zoned backing devices, Dmitry Fomichev, 2019/07/09
- [Qemu-devel] [PATCH 4/4] hw/scsi: Don't realize zoned block devices for virtio-scsi legacy drivers, Dmitry Fomichev, 2019/07/09
- Re: [Qemu-devel] [PATCH 0/4] virtio: handle zoned backing devices, Paolo Bonzini, 2019/07/10