aboutsummaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-04-05 16:53:57 +0200
committerKevin Wolf <kwolf@redhat.com>2010-04-23 16:08:46 +0200
commit6db956039db8a6333265d458be561dc1bc2b4481 (patch)
tree27e4d487c07102b41389bdca255f2693b70de0bf /block.h
parentd6e9098e10e82feeddb824d7c3d0cf61aff96c29 (diff)
downloadqemu-6db956039db8a6333265d458be561dc1bc2b4481.zip
qemu-6db956039db8a6333265d458be561dc1bc2b4481.tar.gz
qemu-6db956039db8a6333265d458be561dc1bc2b4481.tar.bz2
block: get rid of the BDRV_O_FILE flag
BDRV_O_FILE is only used to communicate between bdrv_file_open and bdrv_open. It affects two things: first bdrv_open only searches for protocols using find_protocol instead of all image formats and host drivers. We can easily move that to the caller and pass the found driver to bdrv_open. Second it is used to not force a read-write open of a snapshot file. But we never use bdrv_file_open to open snapshots and this behaviour doesn't make sense to start with. qemu-io abused the BDRV_O_FILE for it's growable option, switch it to using bdrv_file_open to make sure we only open files as growable were we can actually support that. This patch requires Kevin's "[PATCH] Replace calls of old bdrv_open" to be applied first. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r--block.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/block.h b/block.h
index c5900c8..4a57dd5 100644
--- a/block.h
+++ b/block.h
@@ -29,10 +29,6 @@ typedef struct QEMUSnapshotInfo {
#define BDRV_O_RDWR 0x0002
#define BDRV_O_SNAPSHOT 0x0008 /* open the file read only and save writes in a snapshot */
-#define BDRV_O_FILE 0x0010 /* open as a raw file (do not try to
- use a disk image format on top of
- it (default for
- bdrv_file_open()) */
#define BDRV_O_NOCACHE 0x0020 /* do not use the host page cache */
#define BDRV_O_CACHE_WB 0x0040 /* use write-back caching */
#define BDRV_O_NATIVE_AIO 0x0080 /* use native AIO instead of the thread pool */