History | View | Annotate | Download (3.9 kB)
block: add discard support
Add a new bdrv_discard method to free blocks in a mapping image, and a newdrive property to set the granularity for these discard. If no discardgranularity support is set discard support is disabled.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
block: Allow bdrv_flush to return errors
This changes bdrv_flush to return 0 on success and -errno in case of failure.It's a requirement for implementing proper error handle in users of bdrv_flush.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Revert "Make default invocation of block drivers safer (v3)"
This reverts commit 79368c81bf8cf93864d7afc88b81b05d8f0a2c90.
Conflicts:
block.c
I haven't been able to come up with a solution yet for the corruption caused byunaligned requests from the IDE disk so revert until a solution can be written....
block: Fix bdrv_has_zero_init
Assuming that any image on a block device is not properly zero-initialized isactually wrong: Only raw images have this problem. Any other image formatshouldn't care about it, they initialize everything properly themselves....
Make default invocation of block drivers safer (v3)
CVE-2008-2004 described a vulnerability in QEMU whereas a malicious user couldtrick the block probing code into accessing arbitrary files in a guest. Tomitigate this, we added an explicit format parameter to -drive which disabling...
block: separate raw images from the file protocol
We're running into various problems because the "raw" file access, whichis used internally by the various image formats is entangled with the"raw" image format, which maps the VM view 1:1 to a file system....
block: Open the underlying image file in generic code
Format drivers shouldn't need to bother with things like file names, but ratherjust get an open BlockDriverState for the underlying protocol. This patchintroduces this behaviour for bdrv_open implementation. For protocols which...