[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/11] block/raw-format: implement .bdrv_cancel_in_flight han
From: |
Eric Blake |
Subject: |
Re: [PATCH 03/11] block/raw-format: implement .bdrv_cancel_in_flight handler |
Date: |
Wed, 20 Jan 2021 17:15:34 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 11/18/20 12:04 PM, Vladimir Sementsov-Ogievskiy wrote:
> We are going to cancel in-flight requests on mirror nbd target on job
> cancel. Still nbd is often used not directly but as raw-format child.
> So, add pass-through handler here.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> block/raw-format.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Should all filters do this automatically (or rather, should the block
layer do this automatically for all filters)? But I understand that it
does NOT make sense for format drivers in general (cancelling a guest
request may still require metadata updates), where raw-format is the
exception, so doing it in raw-format instead of the block layer makes sense.
> BlockDriver bdrv_raw = {
> .format_name = "raw",
> .instance_size = sizeof(BDRVRawState),
> @@ -608,6 +613,7 @@ BlockDriver bdrv_raw = {
> .bdrv_has_zero_init = &raw_has_zero_init,
> .strong_runtime_opts = raw_strong_runtime_opts,
> .mutable_opts = mutable_opts,
> + .bdrv_cancel_in_flight = raw_cancel_in_flight,
A demonstration of why I don't like aligning the =. But it's merely
cosmetic, so doesn't affect:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- Re: [PATCH 03/11] block/raw-format: implement .bdrv_cancel_in_flight handler,
Eric Blake <=