> -----Original Message----- > From: Lukas Straub <[email protected]> > Sent: Tuesday, May 18, 2021 7:42 PM > To: qemu-devel <[email protected]> > Cc: qemu-block <[email protected]>; Alberto Garcia > <[email protected]>; Kevin Wolf <[email protected]>; Max Reitz > <[email protected]>; Minghao Yuan <[email protected]>; Zhang, Chen > <[email protected]>; Zhang Chen <[email protected]> > Subject: [PATCH Resend] block/quorum: Provide .bdrv_co_flush instead > of .bdrv_co_flush_to_disk > > The quorum block driver uses a custom flush callback to handle the case > when some children return io errors. In that case it still returns success if > enough children are healthy. > However, it provides it as the .bdrv_co_flush_to_disk callback, not > as .bdrv_co_flush. This causes the block layer to do it's own generic flushing > for the children instead, which doesn't handle errors properly. > > Fix this by providing .bdrv_co_flush instead of .bdrv_co_flush_to_disk so the > block layer uses the custom flush callback. > > Signed-off-by: Lukas Straub <[email protected]> > Reported-by: Minghao Yuan <[email protected]> Tested-by: Zhang Chen <[email protected]> Thanks Chen > --- > > Resend: git send-mail put a newline in the Subject: header so the mailing list > rejected it. > > block/quorum.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/quorum.c b/block/quorum.c index cfc1436abb..f2c0805000 > 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -1279,7 +1279,7 @@ static BlockDriver bdrv_quorum = { > .bdrv_dirname = quorum_dirname, > .bdrv_co_block_status = quorum_co_block_status, > > - .bdrv_co_flush_to_disk = quorum_co_flush, > + .bdrv_co_flush = quorum_co_flush, > > .bdrv_getlength = quorum_getlength, > > -- > 2.31.1
