aboutsummaryrefslogtreecommitdiffstats
path: root/block
AgeCommit message (Collapse)AuthorFilesLines
2009-06-06qemu-img: Print available options with -o ?Kevin Wolf7-16/+80
This patch adds a small help text to each of the options in the block drivers which can be displayed by using qemu-img create -f fmt -o ? Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2009-05-28vvfat: one more missing BlockDriver C99 initializer conversionChristoph Hellwig1-4/+3
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-27fully split aio_pool from BlockDriverChristoph Hellwig4-78/+79
Now that we have a separate aio pool structure we can remove those aio pool details from BlockDriver. Every driver supporting AIO now needs to declare a static AIOPool with the aiocb size and the cancellation method. This cleans up the current code considerably and will make it cleaner and more obvious to support two different aio implementations behind a single BlockDriver. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-27qcow: add qcow_aio_setup helperChristoph Hellwig1-23/+29
[this one is required for [PATCH] fully split aio_pool from BlockDriver, sorry for not sending it out earlier] Add a qcow_aio_setup helper to qcow to shared common code between the aio_readv and aio_writev methods. Based on the function with the same name in qcow2. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-27raw-posix: fix hdev_createChristoph Hellwig1-10/+1
We do need hdev_create unconditionally on all platforms so that qemu-img create support for host device works on all platforms. Also relax the check to allow character devices in addition to block devices. On many Unix platforms block devices have buffered block nodes and unbuffered character device nodes, and on FreeBSD the block nodes don't even exist anymore. Also on Linux we do support the /dev/sgN scsi passthrough devices through the host device driver, and probably the old-style /dev/raw/rawN raw devices although I haven't tested that. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-27fix raw_pread_aligned return valueChristoph Hellwig1-1/+1
raw_pread_aligned currently returns the raw return value from lseek/read, which is always -1 in case of an error. But the callers higher up the stack expect it to return the negated errno just like raw_pwrite_aligned. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-27Drop bdrv_create2Kevin Wolf1-2/+9
This patch converts the remaining users of bdrv_create2 to bdrv_create and removes the now unused function. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-27qcow2: Update multiple refcounts at onceKevin Wolf1-4/+36
Don't write each single changed refcount block entry to the disk after it is written, but update all entries of the block and write all of them at once. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-27qcow2: Refactor update_refcountKevin Wolf1-30/+56
This is a preparation patch with no functional changes. It moves the allocation of new refcounts block to a new function and makes update_cluster_refcount (for one cluster) call update_refcount (for multiple clusters) instead the other way round. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-27qcow/qcow2: Drop synchronous qcow_write()Kevin Wolf2-77/+2
There is only one (internal) user left and it can be switched to the normal emulation provided in block.c Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-22Add HTTP protocol using curl v6Alexander Graf1-0/+523
Currently Qemu can read from posix I/O and NBD. This patch adds a third protocol to the game: HTTP. In certain situations it can be useful to access HTTP data directly, for example if you want to try out an http provided OS image, but don't know if you want to download it yet. Using this patch you can now try it on on the fly. Just use it like: qemu -cdrom http://host/path/my.iso Signed-off-by: Alexander Graf <agraf@suse.de>
2009-05-22qcow2: Allow different cluster sizesKevin Wolf1-5/+48
Add an option to specify the cluster size of a newly created qcow2 image. Default is 4k which is the same value that was hard-coded before. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-22Convert all block drivers to new bdrv_createKevin Wolf8-34/+166
Now we can make use of the newly introduced option structures. Instead of having bdrv_create carry more and more parameters (which are format specific in most cases), just pass a option structure as defined by the driver itself. bdrv_create2() contains an emulation of the old interface to simplify the transition. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-21Do not attempt to allocate sn_tab when there are no snapshotsmalc1-0/+5
This was caught by a7d27b536ffc0773028a90f14580552c0c3ddb2a which aborted on this attempt, thanks to Alex Ivanov for report. Signed-off-by: malc <av1474@comtv.ru>
2009-05-14Fix warning on WIN32Anthony Liguori1-1/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-14Move block drivers into their own directoryAnthony Liguori13-0/+11385
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>