block: Add reference parameter to bdrv_open()
Allow bdrv_open() to handle references to existing block devices just asbdrv_file_open() is already capable of.
Signed-off-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: Make bdrv_file_open() static
Add the bdrv_open() option BDRV_O_PROTOCOL which results in passing thecall to bdrv_file_open(). Additionally, make bdrv_file_open() static andtherefore bdrv_open() the only way to call it.
Consequently, all existing calls to bdrv_file_open() have to be adjusted...
block: Reuse reference handling from bdrv_open()
Remove the reference parameter and the related handling code frombdrv_file_open(), since it exists in bdrv_open() now as well.
Signed-off-by: Max Reitz <mreitz@redhat.com>Reviewed-by: Benoit Canet <benoit@irqsave.net>...
qcow2: Set zero flag for discarded clusters
Instead of making the backing file contents visible again after a discardrequest, set the zero flag if possible (i.e. on version >= 3).
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
block: Fix bdrv_is_first_non_filter()
Consider top level BlockDriverStates as well.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Benoit Canet <benoit@irqsave.net>Tested-by: Benoit Canet <benoit@irqsave.net>
block: Change BDS parameter of bdrv_open() to **
Make bdrv_open() take a pointer to a BDS pointer, similarly tobdrv_file_open(). If a pointer to a NULL pointer is given, bdrv_open()will create a new BDS with an empty name; if the BDS pointer is notNULL, that existing BDS will be reused (in the same way as bdrv_open()...
Merge remote-tracking branch 'remotes/stefanha/tags/qtest-monitor-process-pull-request' into staging
qtest resource cleanup pull request
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Tracing pull request
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
This fixes a target-i386 emulation regression
Merge remote-tracking branch 'remotes/riku/linux-user-for-upstream' into staging
View all revisions | View revisions
Also available in: Atom