block: Move 'discard' option to bdrv_open_common()
commit818584a43ab0ef52c131865128ef110f867726cd
authorKevin Wolf <kwolf@redhat.com>
Mon, 12 Sep 2016 16:03:18 +0000 (12 18:03 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 29 Sep 2016 12:13:39 +0000 (29 14:13 +0200)
tree6358c1eec8d02c561324484b11fd8be100dcc606
parentb85114f8cfbede8b153db68875973ef0790bf296
block: Move 'discard' option to bdrv_open_common()

This enables its use for nested child nodes. The compatibility
between the 'discard' and 'detect-zeroes' setting is checked in
bdrv_open_common() now as the former setting isn't available before
calling bdrv_open() any more.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block.c
blockdev.c
include/block/block.h