qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH Resend] block/quorum: Provide .bdrv_co_flush instead of .bdrv_co_flush_to_disk
       [not found] <20210518134214.11ccf05f@gecko.fritz.box>
@ 2021-05-18 13:17 ` Kevin Wolf
  2021-05-19  1:40 ` Zhang, Chen
  1 sibling, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2021-05-18 13:17 UTC (permalink / raw)
  To: Lukas Straub; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

Am 18.05.2021 um 13:42 hat Lukas Straub geschrieben:
> 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 <lukasstraub2@web.de>
> Reported-by: Minghao Yuan <meeho@qq.com>

Thanks, applied to the block branch.

Kevin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH Resend] block/quorum: Provide .bdrv_co_flush instead of .bdrv_co_flush_to_disk
       [not found] <20210518134214.11ccf05f@gecko.fritz.box>
  2021-05-18 13:17 ` [PATCH Resend] block/quorum: Provide .bdrv_co_flush instead of .bdrv_co_flush_to_disk Kevin Wolf
@ 2021-05-19  1:40 ` Zhang, Chen
  1 sibling, 0 replies; 2+ messages in thread
From: Zhang, Chen @ 2021-05-19  1:40 UTC (permalink / raw)
  To: Lukas Straub, qemu-devel
  Cc: Kevin Wolf, Alberto Garcia, qemu-block, Max Reitz, Zhang Chen,
	Minghao Yuan



> -----Original Message-----
> From: Lukas Straub <lukasstraub2@web.de>
> Sent: Tuesday, May 18, 2021 7:42 PM
> To: qemu-devel <qemu-devel@nongnu.org>
> Cc: qemu-block <qemu-block@nongnu.org>; Alberto Garcia
> <berto@igalia.com>; Kevin Wolf <kwolf@redhat.com>; Max Reitz
> <mreitz@redhat.com>; Minghao Yuan <meeho@qq.com>; Zhang, Chen
> <chen.zhang@intel.com>; Zhang Chen <zhangckid@gmail.com>
> 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 <lukasstraub2@web.de>
> Reported-by: Minghao Yuan <meeho@qq.com>

Tested-by: Zhang Chen <chen.zhang@intel.com>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-19  1:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20210518134214.11ccf05f@gecko.fritz.box>
2021-05-18 13:17 ` [PATCH Resend] block/quorum: Provide .bdrv_co_flush instead of .bdrv_co_flush_to_disk Kevin Wolf
2021-05-19  1:40 ` Zhang, Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).