Kevin Wolf cb53460b70 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>
2018-10-01 19:13:46 +02:00
..
2018-07-10 16:01:52 +02:00
2018-08-31 16:28:33 +02:00
2018-08-15 12:50:39 +02:00
2016-10-07 14:14:06 +02:00
2018-09-25 15:50:15 +02:00
2018-07-05 10:29:19 +02:00
2018-08-15 12:50:39 +02:00
2018-08-15 10:12:35 +08:00
2018-02-09 05:05:11 +01:00
2018-07-10 17:28:29 +01:00
2018-07-30 15:35:37 +02:00
2017-07-17 11:34:11 +08:00
2018-08-15 12:50:39 +02:00
2018-07-10 16:01:52 +02:00
2018-07-02 14:45:23 +02:00
2018-06-15 14:49:44 +02:00