summary refs log tree commit diff stats
path: root/fsdev/qemu-fsdev.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-09-28 11:11:50 +0200
committerKevin Wolf <kwolf@redhat.com>2018-10-01 19:13:46 +0200
commitcb53460b708db3617ab73248374d071d5552c263 (patch)
treede909ac9f8ba379fd66a4851c1370160a05a4ce0 /fsdev/qemu-fsdev.c
parentbd016b912cc68c6f6c68cd5acb2e13126bd9e05c (diff)
downloadfocaccia-qemu-cb53460b708db3617ab73248374d071d5552c263.tar.gz
focaccia-qemu-cb53460b708db3617ab73248374d071d5552c263.zip
block-backend: Set werror/rerror defaults in blk_new()
Currently, the default values for werror and rerror have to be set
explicitly with blk_set_on_error() by the callers of blk_new(). The only
caller actually doing this is blockdev_init(), which is called for
BlockBackends created using -drive.

In particular, anonymous BlockBackends created with
-device ...,drive=<node-name> didn't get the correct default set and
instead defaulted to the integer value 0 (= BLOCKDEV_ON_ERROR_REPORT).
This is the intended default for rerror anyway, but the default for
werror should be BLOCKDEV_ON_ERROR_ENOSPC.

Set the defaults in blk_new() instead so that they apply no matter what
way the BlockBackend was created.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'fsdev/qemu-fsdev.c')
0 files changed, 0 insertions, 0 deletions