Skip to content
Snippets Groups Projects
Commit 5529b02d authored by Lukas Straub's avatar Lukas Straub Committed by Kevin Wolf
Browse files

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: default avatarLukas Straub <lukasstraub2@web.de>
Reported-by: default avatarMinghao Yuan <meeho@qq.com>
Message-Id: <20210518134214.11ccf05f@gecko.fritz.box>
Tested-by: default avatarZhang Chen <chen.zhang@intel.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent dd2db39d
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment