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 <vsement...@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 <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org