Statistics
| Branch: | Revision:

root / block.c @ 72249e34

History | View | Annotate | Download (42.2 kB)

# Date Author Comment
3ec88e80 02/06/2009 12:05 am aliguori

block: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6527 c046a42c-6fe2-441c-8c8c-71466251a162

249aa745 01/26/2009 07:17 pm aliguori

qemu iovec: keep track of total size, allow partial copies (Gerd Hoffman)

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6448 c046a42c-6fe2-441c-8c8c-71466251a162

1987530f 01/22/2009 08:57 pm aliguori

qcow2 format: keep 'num_free_bytes', and show it upon 'info blockstats' (Uri Lublin)

'num_free_bytes' is the number of non-allocated bytes below highest-allocation.
It's useful, together with the highest-allocation, to figure out how
fragmented the image is, and how likely it will run out-of-space soon....

a7cbfae0 01/22/2009 08:57 pm aliguori

info blockstats: show highest_allocated if exists (Uri Lublin)

Signed-off-by: Uri Lublin <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6406 c046a42c-6fe2-441c-8c8c-71466251a162

3b69e4b9 01/22/2009 06:59 pm aliguori

Vectored block device API (Avi Kivity)

Most devices that are capable of DMA are also capable of scatter-gather.
With the memory mapping API, this means that the device code needs to be
able to access discontiguous host memory regions.

For block devices, this translates to vectored I/O. This patch implements...

42fb2807 01/15/2009 10:43 pm aliguori

bdrv_write should not stop on partial write (Gleb Natapov)

Should return real error instead.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6323 c046a42c-6fe2-441c-8c8c-71466251a162

a38131b6 12/05/2008 07:56 pm blueswir1

Attached patch contains warning fixes.

Signed-off-by: Christoph Egger <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5888 c046a42c-6fe2-441c-8c8c-71466251a162

3990d09a 12/05/2008 07:53 pm blueswir1

sys-queue.h defines SYS_QUEUE_H which is also defined by
the <sys/queue.h> system header. <sys/disk.h> uses SLIST_ENTRY
on NetBSD, which doesn't exist in sys-queue.h. Therefore,
include <sys/queue.h> before including sys-queue.h.

Signed-off-by: Christoph Egger <>...

f3d54fc4 11/25/2008 11:50 pm aliguori

Abstract out geometry detection code from IDE for reuse

Virtio will want to use the geometry detection code. It doesn't belong
in ide.c anyway.

Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5797 c046a42c-6fe2-441c-8c8c-71466251a162

4fc9af53 11/08/2008 06:27 pm aliguori

Use an option rom instead of boot sector for -kernel

Generate an option rom instead of using a hijacked boot sector for kernel
booting. This just requires adding a small option ROM header and a few more
instructions to the boot sector to take over the int19 vector and run our...

9f7965c7 10/14/2008 05:42 pm aliguori

Expand cache= option and use write-through caching by default

This patch changes the cache= option to accept none, writeback, or writethough
to control the host page cache behavior. By default, writethrough caching is
now used which internally is implemented by using O_DSYNC to open the disk...

a0a83536 10/14/2008 12:08 am aurel32

open() can also return EPERM for O_RDWR on a readonly device

Signed-off-by: Juergen Lock <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5482 c046a42c-6fe2-441c-8c8c-71466251a162

c6ca28d6 10/06/2008 04:55 pm aliguori

Add bdrv_flush_all()

This patch adds a bdrv_flush_all() function. It's necessary to ensure that all
IO operations have been flushed to disk before completely a live migration.

N.B. we don't actually use this now. We really should flush the block drivers...

a76bab49 09/22/2008 10:17 pm aliguori

Refactor AIO to allow multiple AIO implementations

This patch refactors the AIO layer to allow multiple AIO implementations. It's
only possible because of the recent signalfd() patch.

Right now, the AIO infrastructure is pretty specific to the block raw backend....

7ee930d0 09/17/2008 10:04 pm blueswir1

Fix warnings that would be caused by ld flag --warn-common

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5240 c046a42c-6fe2-441c-8c8c-71466251a162

03ff3ca3 09/15/2008 06:51 pm aliguori

Use common objects for qemu-img and qemu-nbd

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...

7ccfb2eb 09/14/2008 09:45 am blueswir1

Fix warnings that would be caused by gcc flag -Wwrite-strings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162

7c96d46e 09/12/2008 08:54 pm aliguori

Let snapshot work with protocols

realpath will horribly mangle a protocol so avoid calling it if the backing
file is a protocol.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5200 c046a42c-6fe2-441c-8c8c-71466251a162

a3392f9b 09/11/2008 09:00 pm aliguori

Only build compatfd when using AIO and make sure to always init AIO

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...

baf35cb9 09/10/2008 06:45 pm aliguori

Use signalfd() to work around signal/select race

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...

79383c9c 08/30/2008 12:51 pm blueswir1

Fix some warnings that would be generated by gcc -Wredundant-decls

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5115 c046a42c-6fe2-441c-8c8c-71466251a162

cd01b4a3 08/21/2008 10:25 pm aliguori

Fix windows build

Right now, the Windows build is broken because of NBD. Using a mingw32 cross
compiler is also badly broken.

This patch fixes the Windows build by stubbing out NBD support until someone
fixes it for Windows. It also santizing the mingw32 cross compiler support...

75818250 07/03/2008 04:41 pm ths

Allow QEMU to connect directly to an NBD server, by Laurent Vivier.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4838 c046a42c-6fe2-441c-8c8c-71466251a162

f58c7b35 06/06/2008 12:53 am ths

New qemu-img convert -B option, by Marc Bevand.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4672 c046a42c-6fe2-441c-8c8c-71466251a162

34c6f050 04/08/2008 10:51 pm aurel32

unlink the bs from bdrv-list upon bdrv_delete(bs)

(Uri Lublin)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4179 c046a42c-6fe2-441c-8c8c-71466251a162

b5eff355 03/12/2008 01:30 am aurel32

Revert fix for CVE-2008-0928. Will be fixed in a different way later.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4041 c046a42c-6fe2-441c-8c8c-71466251a162

902b27d0 03/11/2008 07:17 pm aurel32

Fix CVE-2008-0928 - insufficient block device address range checking

Qemu 0.9.1 and earlier does not perform range checks for block device
read or write requests, which allows guest host users with root
privileges to access arbitrary memory and escape the virtual machine....

0badc1ee 03/10/2008 02:05 am aurel32

Honor TMPDIR environment variable

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4033 c046a42c-6fe2-441c-8c8c-71466251a162

985a03b0 12/24/2007 06:10 pm ths

Real SCSI device passthrough (v4), by Laurent Vivier.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3851 c046a42c-6fe2-441c-8c8c-71466251a162

33f00271 12/24/2007 04:33 pm balrog

Add "cache" parameter to "-drive" (Laurent Vivier).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162

96b8f136 12/17/2007 03:35 am ths

Fix bdrv_get_geometry to return uint64_t, by Andre Przywara.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3825 c046a42c-6fe2-441c-8c8c-71466251a162

a36e69dd 12/02/2007 07:18 am ths

Collecting block device statistics, by Richard W.M. Jones.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3760 c046a42c-6fe2-441c-8c8c-71466251a162

9596ebb7 11/18/2007 03:44 am pbrook

Add statics and missing #includes for prototypes.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162

87ecb68b 11/17/2007 07:14 pm pbrook

Break up vl.h.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162

faf07963 11/11/2007 04:51 am pbrook

Split block API from vl.h.
Remove QEMU_TOOL. Replace with QEMU_IMG and NEED_CPU_H.
Avoid linking qemu-img against whole system emulatior.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3578 c046a42c-6fe2-441c-8c8c-71466251a162

3b46e624 09/17/2007 11:09 am ths

find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

6ada7453 08/01/2007 02:28 am ths

Parallels disk image support, by Alex Beregszaszi.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3102 c046a42c-6fe2-441c-8c8c-71466251a162

eb5c851f 02/11/2007 05:06 pm ths

Use PATH_MAX for name lengths, by Sergey Vlasov.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2419 c046a42c-6fe2-441c-8c8c-71466251a162

71c2fd5c 01/26/2007 05:37 pm ths

Define ENOMEDIUM to match ENODEV if it isn't available.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2357 c046a42c-6fe2-441c-8c8c-71466251a162

7f1c9da9 01/19/2007 12:43 am ths

Darwin build fix, by Pierre d'Herbemont.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2334 c046a42c-6fe2-441c-8c8c-71466251a162

21664424 01/07/2007 08:22 pm bellard

path_is_absolute() fix for win32

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2307 c046a42c-6fe2-441c-8c8c-71466251a162

3b9f94e1 01/07/2007 07:27 pm bellard

win32 block device fixes (initial patch by kazu)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2305 c046a42c-6fe2-441c-8c8c-71466251a162

fef30743 12/22/2006 04:11 pm ths

Escape filname printout properly, by Anthony Liguori and Julian Seward.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2263 c046a42c-6fe2-441c-8c8c-71466251a162

a817d936 08/24/2006 10:53 pm bellard

fixed handling of relative filenames with -snapshot

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2136 c046a42c-6fe2-441c-8c8c-71466251a162

f45512fe 08/24/2006 12:40 am bellard

win32 compilation fixes

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2134 c046a42c-6fe2-441c-8c8c-71466251a162

6b21b973 08/24/2006 12:14 am bellard

fixed error handling

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2133 c046a42c-6fe2-441c-8c8c-71466251a162

19cb3738 08/19/2006 02:45 pm bellard

better support of host drives

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2124 c046a42c-6fe2-441c-8c8c-71466251a162

90765429 08/07/2006 10:10 pm bellard

fixed aio emulation

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2099 c046a42c-6fe2-441c-8c8c-71466251a162

ce1a14dc 08/07/2006 05:38 am pbrook

Dynamically allocate AIO Completion Blocks.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2098 c046a42c-6fe2-441c-8c8c-71466251a162

d15a771d 08/06/2006 04:35 pm bellard

qcow2 is now used for '-snapshot' - keep BlockDriverState.total_sectors

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2094 c046a42c-6fe2-441c-8c8c-71466251a162

faea38e7 08/06/2006 12:31 am bellard

multiple snapshot support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2086 c046a42c-6fe2-441c-8c8c-71466251a162

83f64091 08/01/2006 07:21 pm bellard

async file I/O API

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2075 c046a42c-6fe2-441c-8c8c-71466251a162

beac80cd 06/26/2006 11:08 pm bellard

Windows sparse file support (Frediano Ziglio)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2027 c046a42c-6fe2-441c-8c8c-71466251a162

7a6cba61 06/04/2006 02:39 pm pbrook

Disk cache flush support.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1949 c046a42c-6fe2-441c-8c8c-71466251a162

ec530c81 04/26/2006 01:36 am bellard

Solaris port (Ben Taylor)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1855 c046a42c-6fe2-441c-8c8c-71466251a162

95389c86 12/18/2005 08:28 pm bellard

qcow_make_empty() support (Johannes Schindelin)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1716 c046a42c-6fe2-441c-8c8c-71466251a162

79639d42 11/26/2005 12:58 pm bellard

update boot sector when using -kernel (Magnus Damm)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1664 c046a42c-6fe2-441c-8c8c-71466251a162

3b0d4f61 10/30/2005 08:30 pm bellard

OS X: support for the built in CD-ROM drive (Mike Kronenberg)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1583 c046a42c-6fe2-441c-8c8c-71466251a162

712e7874 04/29/2005 12:09 am bellard

probing fixes

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1425 c046a42c-6fe2-441c-8c8c-71466251a162

6a0f9e82 04/27/2005 11:17 pm bellard

Virtual PC read-only disk image support (Alex Beregszaszi)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1417 c046a42c-6fe2-441c-8c8c-71466251a162

e5484d33 04/27/2005 10:55 pm bellard

BSD fix

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1413 c046a42c-6fe2-441c-8c8c-71466251a162

7674e7bf 04/27/2005 12:59 am bellard

BSD cdrom device access fix

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1412 c046a42c-6fe2-441c-8c8c-71466251a162

c747cd1f 04/27/2005 12:47 am bellard

raw CDROM access for windows (Filip Navara)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1411 c046a42c-6fe2-441c-8c8c-71466251a162

a8753c34 04/27/2005 12:34 am bellard

Bochs disk image support (Alex Beregszaszi)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1409 c046a42c-6fe2-441c-8c8c-71466251a162

585d0ed9 12/12/2004 01:24 pm bellard

.dmg disk image format support (Johannes Schindelin)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1171 c046a42c-6fe2-441c-8c8c-71466251a162

46d4767d 11/16/2004 03:45 am bellard

better BIOS ATA translation support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1153 c046a42c-6fe2-441c-8c8c-71466251a162

3c56521b 09/30/2004 12:29 am bellard

cloop driver (Johannes Schindelin)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1076 c046a42c-6fe2-441c-8c8c-71466251a162

e2731add 09/18/2004 10:32 pm bellard

fixed block close() method prototype

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1068 c046a42c-6fe2-441c-8c8c-71466251a162

d5249393 08/04/2004 12:14 am bellard

64 bit file I/O by default

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1040 c046a42c-6fe2-441c-8c8c-71466251a162

ea2384d3 08/02/2004 12:59 am bellard

new disk image layer

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1037 c046a42c-6fe2-441c-8c8c-71466251a162

81d0912d 07/14/2004 08:21 pm bellard

completion support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1020 c046a42c-6fe2-441c-8c8c-71466251a162

eba2af63 06/19/2004 08:23 pm bellard

buffer overflow fix

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@932 c046a42c-6fe2-441c-8c8c-71466251a162

2b64948e 05/08/2004 06:27 pm bellard

64 bit fix

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@790 c046a42c-6fe2-441c-8c8c-71466251a162

67b915a5 04/01/2004 02:37 am bellard

win32 port (initial patch by kazu)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@692 c046a42c-6fe2-441c-8c8c-71466251a162

b338082b 03/14/2004 11:38 pm bellard

remoable device support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@658 c046a42c-6fe2-441c-8c8c-71466251a162

00af2b26 02/26/2004 02:20 am bellard

added cow.h

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@653 c046a42c-6fe2-441c-8c8c-71466251a162

cf98951b 02/16/2004 11:56 pm bellard

force boot sector feature

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@616 c046a42c-6fe2-441c-8c8c-71466251a162

33e3963e 07/06/2003 08:15 pm bellard

added user mode Linux Copy On Write disk image support - added -snapshot support (initial patch by Rusty Russell)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@309 c046a42c-6fe2-441c-8c8c-71466251a162

0849bf08 07/01/2003 02:17 am bellard

allow read only images

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@299 c046a42c-6fe2-441c-8c8c-71466251a162

fc01f7e7 06/30/2003 01:03 pm bellard

IDE emulation

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@291 c046a42c-6fe2-441c-8c8c-71466251a162