summaryrefslogtreecommitdiff
path: root/block-raw-posix.c
AgeCommit message (Collapse)AuthorFilesLines
2008-09-16block-raw is not a protocolaliguori1-1/+0
The protocol_name "file" was added to the block driver when async IO was introduced. This can be used to select that a file is treated as a raw device instead of probing for the type. However, protocols are not subject to path interpretation which cases qcow2 images with raw base images to not function is the path was specified relatively. The fix is simply to remove the protocol_name from the raw block driver. The proper way to force the use of a raw block format is to use the format= option with -drive. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5233 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-15Make sure to define fd_open when not on Linuxaliguori1-0/+5
My previous commit broke the build. This was spotted by C.W. Betts. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5231 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-15Use common objects for qemu-img and qemu-nbdaliguori1-27/+8
Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over the code. It's ugly and causes us to have to build multiple object files for linking against qemu and the tools. This patch introduces a new file, qemu-tool.c which contains enough for qemu-img, qemu-nbd, and QEMU to all share the same objects. This also required getting qemu-nbd to be a bit more Windows friendly. I also changed the Windows block-raw to use normal IO instead of overlapping IO since we don't actually do AIO yet on Windows. I changed the various #if 0's to #if WIN32_AIO to make it easier for someone to eventually fix AIO on Windows. After this patch, there are no longer any #ifdef's related to qemu-img and qemu-nbd. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5226 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-11Only build compatfd when using AIO and make sure to always init AIOaliguori1-0/+3
OpenBSD doesn't use AIO so don't try to build compatfd when not using AIO. Also make sure to call qemu_aio_init() from bdrv_init. Everything that uses bdrv calls bdrv_init so it makes sense to init aio from there instead of in every single tool. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5197 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-11Make sure to read siginfo from signalfdaliguori1-0/+27
Otherwise, we'll idle at 100% cpu. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5195 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-10Use signalfd() to work around signal/select racealiguori1-81/+48
This patch introduces signalfd() to work around the signal/select race in checking for AIO completions. For platforms that don't support signalfd(), we emulate it with threads. There was a long discussion about this approach. I don't believe there are any fundamental problems with this approach and I believe eliminating the use of signals is a good thing. I've tested Windows and Linux using Windows and Linux guests. I've also checked for disk IO performance regressions. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5187 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-24Add missing FreeBSD #include (Juergen Lock)blueswir11-0/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5081 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-15Preliminary OpenBSD host support (based on OpenBSD patches by Todd T. Fries)blueswir11-0/+27
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5012 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-15Use AIO only if host supports it (based on OpenBSD patches by Todd T. Fries)blueswir11-0/+38
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5010 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-03Add a parameter to disable host cache, by Laurent Vivier.ths1-8/+8
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4836 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-28Align file accesses with cache=off (O_DIRECT) (Kevin Wolf, Laurent Vivier)bellard1-2/+238
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4599 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-07Revert 4367blueswir11-113/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4377 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-06Align file accesses with cache=off (Kevin Wolf, Laurent Vivier)blueswir11-6/+113
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4367 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-06restore original values for ai.aio_threads and ai.aio_numbellard1-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3896 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-24Real SCSI device passthrough (v4), by Laurent Vivier.ths1-5/+22
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3851 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-24Add "cache" parameter to "-drive" (Laurent Vivier).balrog1-0/+8
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-15Split block-raw.c into block-raw-posix.c and block-raw-win32.c, byths1-0/+901
Anthony Liguori. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3814 c046a42c-6fe2-441c-8c8c-71466251a162