[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v8 09/21] null: Switch to .bdrv_co_block_status(
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [PATCH v8 09/21] null: Switch to .bdrv_co_block_status() |
Date: |
Fri, 23 Feb 2018 18:05:25 +0100 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 23.02.2018 um 17:43 hat Eric Blake geschrieben:
> > OFFSET_VALID | DATA might be excusable because I can see that it's
> > convenient that a protocol driver refers to itself as *file instead of
> > returning NULL there and then the offset is valid (though it would be
> > pointless to actually follow the file pointer), but OFFSET_VALID without
> > DATA probably isn't.
>
> So OFFSET_VALID | DATA for a protocol BDS is not just convenient, but
> necessary to avoid breaking qemu-img map output. But you are also right
> that OFFSET_VALID without data makes little sense at a protocol layer. So
> with that in mind, I'm auditing all of the protocol layers to make sure
> OFFSET_VALID ends up as something sane.
That's one way to look at it.
The other way is that qemu-img map shouldn't ask the protocol layer for
its offset because it already knows the offset (it is what it passes as
a parameter to bdrv_co_block_status).
Anyway, it's probably not worth changing the interface, we should just
make sure that the return values of the individual drivers are
consistent.
Kevin
- [Qemu-block] [PATCH v8 03/21] block: Switch passthrough drivers to .bdrv_co_block_status(), (continued)
[Qemu-block] [PATCH v8 11/21] qcow: Switch to .bdrv_co_block_status(), Eric Blake, 2018/02/13
[Qemu-block] [PATCH v8 14/21] raw: Switch to .bdrv_co_block_status(), Eric Blake, 2018/02/13
[Qemu-block] [PATCH v8 01/21] block: Add .bdrv_co_block_status() callback, Eric Blake, 2018/02/13
[Qemu-block] [PATCH v8 10/21] parallels: Switch to .bdrv_co_block_status(), Eric Blake, 2018/02/13
[Qemu-block] [PATCH v8 15/21] sheepdog: Switch to .bdrv_co_block_status(), Eric Blake, 2018/02/13
[Qemu-block] [PATCH v8 12/21] qcow2: Switch to .bdrv_co_block_status(), Eric Blake, 2018/02/13
[Qemu-block] [PATCH v8 13/21] qed: Switch to .bdrv_co_block_status(), Eric Blake, 2018/02/13
[Qemu-block] [PATCH v8 16/21] vdi: Avoid bitrot of debugging code, Eric Blake, 2018/02/13