[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] b2f65d: qcow2: Work with bytes in qcow2_get_c
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] b2f65d: qcow2: Work with bytes in qcow2_get_cluster_offset... |
Date: |
Thu, 16 Jun 2016 08:30:05 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: b2f65d6b02b7df0a780a974a97f26fbf0e464964
https://github.com/qemu/qemu/commit/b2f65d6b02b7df0a780a974a97f26fbf0e464964
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/qcow2-cluster.c
Log Message:
-----------
qcow2: Work with bytes in qcow2_get_cluster_offset()
This patch changes the units that qcow2_get_cluster_offset() uses
internally, without touching the interface just yet. This will be done
in another patch.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Commit: ecfe186380e6fc3a556dff05b866ca213e277fc7
https://github.com/qemu/qemu/commit/ecfe186380e6fc3a556dff05b866ca213e277fc7
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/qcow2-cluster.c
M block/qcow2.c
M block/qcow2.h
Log Message:
-----------
qcow2: Implement .bdrv_co_preadv()
Reading from qcow2 images is now byte granularity.
Most of the affected code in qcow2 actually gets simpler with this
change. The only exception is encryption, which is fixed on 512 bytes
blocks; in order to keep this working, bs->request_alignment is set for
encrypted images.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Commit: aaa4d20b4972bb1a811ce929502e6741835d584e
https://github.com/qemu/qemu/commit/aaa4d20b4972bb1a811ce929502e6741835d584e
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/qcow2-cluster.c
Log Message:
-----------
qcow2: Make copy_sectors() byte based
This will allow copy on write operations where the overwritten part of
the cluster is not aligned to sector boundaries.
Also rename the function because it has nothing to do with sectors any
more.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Commit: 8556739355d2a5392334c237486e32bd0f24c227
https://github.com/qemu/qemu/commit/8556739355d2a5392334c237486e32bd0f24c227
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/qcow2-cluster.c
M block/qcow2.h
Log Message:
-----------
qcow2: Use bytes instead of sectors for QCowL2Meta
In preparation for implementing .bdrv_co_pwritev in qcow2.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Commit: d46a0bb24d6061c1eadcf1136fa73dc7c4ac267d
https://github.com/qemu/qemu/commit/d46a0bb24d6061c1eadcf1136fa73dc7c4ac267d
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/qcow2-cluster.c
M block/qcow2.c
M block/qcow2.h
M trace-events
Log Message:
-----------
qcow2: Implement .bdrv_co_pwritev()
This changes qcow2 to implement the byte-based .bdrv_co_pwritev
interface rather than the sector-based old one.
As preallocation uses the same allocation function as normal writes, and
the interface of that function needs to be changed, it is converted in
the same patch.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Commit: 38a53d506be5efc83a33498948d8e6ba838dd836
https://github.com/qemu/qemu/commit/38a53d506be5efc83a33498948d8e6ba838dd836
Author: Colin Lord <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M blockdev.c
Log Message:
-----------
blockdev: clarify error on attempt to open locked tray
When opening a device with a locked tray, gives an error explaining the
device tray is locked and that the user should wait and try again. This
is less confusing than the previous error, which simply stated that the
tray was locked.
Signed-off-by: Colin Lord <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 479b5998d4149bef94a5900291b51804eff39a3d
https://github.com/qemu/qemu/commit/479b5998d4149bef94a5900291b51804eff39a3d
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M hmp.c
Log Message:
-----------
hmp: acquire aio_context in hmp_qemu_io
Acquire aio context before run command, this is mandatory for unit tests.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 9e19036e5a3c5abfe57984ca98ab064acfca83a3
https://github.com/qemu/qemu/commit/9e19036e5a3c5abfe57984ca98ab064acfca83a3
Author: Cédric Le Goater <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M hw/block/m25p80.c
Log Message:
-----------
m25p80: fix test on blk_pread() return value
commit 243e6f69c129 ("m25p80: Switch to byte-based block access")
replaced blk_read() calls with blk_pread() but return values are
different.
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 604e86136266d104210a74be4c82643300c74e69
https://github.com/qemu/qemu/commit/604e86136266d104210a74be4c82643300c74e69
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M qemu-img.c
Log Message:
-----------
qemu-img bench: Fix uninitialised writethrough mode
If no -t option is specified, bool writethrough stayed uninitialised.
Initialise it as false, which makes cache=writeback the default cache
mode.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 73698c30caaf16e990b8b2e6e7bc64928947e65e
https://github.com/qemu/qemu/commit/73698c30caaf16e990b8b2e6e7bc64928947e65e
Author: Eric Blake <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/mirror.c
Log Message:
-----------
block: Avoid bogus flags during mirroring
Commit e253f4b8 converted mirroring from sector-based bdrv_aio_*
to byte-based blk_aio_*, but failed to account for the subtle
difference in signatures (the former takes a semi-redundant length,
the latter takes a flags parameter). Since all of our flags are
currently smaller in size than BDRV_SECTOR_SIZE, it has no ill
effects until we either perform sub-sector mirroring, or we start
asserting that no unexpected flags are set. I found it while
testing new asserts when qemu-iotests 132 started warning about an
unknown flag 0x200000.
Signed-off-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: fa166538743d4e28de7374c41332c3e448826f4b
https://github.com/qemu/qemu/commit/fa166538743d4e28de7374c41332c3e448826f4b
Author: Eric Blake <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
M include/block/block.h
Log Message:
-----------
block: Assert that flags are in range
Add a new BDRV_REQ_MASK constant, and use it to make sure that
caller flags are always valid.
Tested with 'make check' and with qemu-iotests on both '-raw'
and '-qcow2'; the only failure turned up was fixed in the
previous commit.
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 8c0dcbc4ad2bf4f9f3b27c637b357e87cad70ec7
https://github.com/qemu/qemu/commit/8c0dcbc4ad2bf4f9f3b27c637b357e87cad70ec7
Author: Daniel P. Berrange <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/qcow.c
M block/qcow2.c
M tests/qemu-iotests/087.out
Log Message:
-----------
block: drop support for using qcow[2] encryption with system emulators
Back in the 2.3.0 release we declared qcow[2] encryption as
deprecated, warning people that it would be removed in a future
release.
commit a1f688f4152e65260b94f37543521ceff8bfebe4
Author: Markus Armbruster <address@hidden>
Date: Fri Mar 13 21:09:40 2015 +0100
block: Deprecate QCOW/QCOW2 encryption
The code still exists today, but by a (happy?) accident we entirely
broke the ability to use qcow[2] encryption in the system emulators
in the 2.4.0 release due to
commit 8336aafae1451d54c81dd2b187b45f7c45d2428e
Author: Daniel P. Berrange <address@hidden>
Date: Tue May 12 17:09:18 2015 +0100
qcow2/qcow: protect against uninitialized encryption key
This commit was designed to prevent future coding bugs which
might cause QEMU to read/write data on an encrypted block
device in plain text mode before a decryption key is set.
It turns out this preventative measure was a little too good,
because we already had a long standing bug where QEMU read
encrypted data in plain text mode during system emulator
startup, in order to guess disk geometry:
Thread 10 (Thread 0x7fffd3fff700 (LWP 30373)):
#0 0x00007fffe90b1a28 in raise () at /lib64/libc.so.6
#1 0x00007fffe90b362a in abort () at /lib64/libc.so.6
#2 0x00007fffe90aa227 in __assert_fail_base () at /lib64/libc.so.6
#3 0x00007fffe90aa2d2 in () at /lib64/libc.so.6
#4 0x000055555587ae19 in qcow2_co_readv (bs=0x5555562accb0, sector_num=0,
remaining_sectors=1, qiov=0x7fffffffd260) at block/qcow2.c:1229
#5 0x000055555589b60d in bdrv_aligned_preadv (address@hidden,
address@hidden, address@hidden, address@hidden, address@hidden, address@hidden,
flags=0) at block/io.c:908
#6 0x000055555589b8bc in bdrv_co_do_preadv (bs=0x5555562accb0, offset=0,
bytes=512, qiov=0x7fffffffd260, flags=<optimized out>) at block/io.c:999
#7 0x000055555589c375 in bdrv_rw_co_entry (opaque=0x7fffffffd210) at
block/io.c:544
#8 0x000055555586933b in coroutine_thread (opaque=0x555557876310) at
coroutine-gthread.c:134
#9 0x00007ffff64e1835 in g_thread_proxy (data=0x5555562b5590) at
gthread.c:778
#10 0x00007ffff6bb760a in start_thread () at /lib64/libpthread.so.0
#11 0x00007fffe917f59d in clone () at /lib64/libc.so.6
Thread 1 (Thread 0x7ffff7ecab40 (LWP 30343)):
#0 0x00007fffe91797a9 in syscall () at /lib64/libc.so.6
#1 0x00007ffff64ff87f in g_cond_wait (address@hidden <coroutine_cond>,
address@hidden <coroutine_lock>) at gthread-posix.c:1397
#2 0x00005555558692c3 in qemu_coroutine_switch (co=<optimized out>) at
coroutine-gthread.c:117
#3 0x00005555558692c3 in qemu_coroutine_switch (from_=0x5555562b5e30,
address@hidden, address@hidden) at coroutine-gthread.c:175
#4 0x0000555555868a90 in qemu_coroutine_enter (co=0x555557876310,
opaque=0x0) at qemu-coroutine.c:116
#5 0x0000555555859b84 in thread_pool_completion_bh (opaque=0x7fffd40010e0)
at thread-pool.c:187
#6 0x0000555555859514 in aio_bh_poll (address@hidden) at async.c:85
#7 0x0000555555864d10 in aio_dispatch (address@hidden) at aio-posix.c:135
#8 0x0000555555864f75 in aio_poll (address@hidden, address@hidden) at
aio-posix.c:291
#9 0x000055555589c40d in bdrv_prwv_co (address@hidden, address@hidden,
address@hidden, address@hidden, address@hidden(unknown: 0)) at block/io.c:591
#10 0x000055555589c503 in bdrv_rw_co (address@hidden, address@hidden,
address@hidden "\321,", address@hidden, address@hidden, address@hidden(unknown:
0)) at block/io.c:614
#11 0x000055555589c562 in bdrv_read_unthrottled (nb_sectors=21845,
buf=0x7fffffffd2e0 "\321,", sector_num=0, bs=0x5555562accb0) at block/io.c:622
#12 0x000055555589c562 in bdrv_read_unthrottled (bs=0x5555562accb0,
address@hidden, address@hidden "\321,", address@hidden) at block/io.c:634
address@hidden) at block/block-backend.c:504
#14 0x0000555555752e9f in guess_disk_lchs (address@hidden, address@hidden,
address@hidden, address@hidden) at hw/block/hd-geometry.c:68
#15 0x0000555555752ff7 in hd_geometry_guess (blk=0x5555562a5290,
address@hidden, address@hidden, address@hidden, address@hidden) at
hw/block/hd-geometry.c:133
#16 0x0000555555752b87 in blkconf_geometry (address@hidden, address@hidden,
address@hidden, address@hidden, address@hidden, address@hidden) at
hw/block/block.c:71
#17 0x0000555555799bc4 in ide_dev_initfn (dev=0x555557875c80, kind=IDE_HD) at
hw/ide/qdev.c:174
#18 0x0000555555768394 in device_realize (dev=0x555557875c80,
errp=0x7fffffffd640) at hw/core/qdev.c:247
#19 0x0000555555769a81 in device_set_realized (obj=0x555557875c80,
value=<optimized out>, errp=0x7fffffffd730) at hw/core/qdev.c:1058
#20 0x00005555558240ce in property_set_bool (obj=0x555557875c80, v=<optimized
out>, opaque=0x555557875de0, name=<optimized out>, errp=0x7fffffffd730)
at qom/object.c:1514
#21 0x0000555555826c87 in object_property_set_qobject (address@hidden,
address@hidden, address@hidden "realized", address@hidden) at
qom/qom-qobject.c:24
#22 0x0000555555825760 in object_property_set_bool (address@hidden,
address@hidden, address@hidden "realized", address@hidden) at qom/object.c:905
#23 0x000055555576897b in qdev_init_nofail (address@hidden) at
hw/core/qdev.c:380
#24 0x0000555555799ead in ide_create_drive (address@hidden, address@hidden,
drive=0x5555562b77e0) at hw/ide/qdev.c:122
#25 0x000055555579a746 in pci_ide_create_devs (address@hidden,
address@hidden) at hw/ide/pci.c:440
#26 0x000055555579b165 in pci_piix3_ide_init (bus=<optimized out>,
hd_table=0x7fffffffd830, devfn=<optimized out>) at hw/ide/piix.c:218
#27 0x000055555568ca55 in pc_init1 (machine=0x5555562960a0, pci_enabled=1,
kvmclock_enabled=<optimized out>) at
/home/berrange/src/virt/qemu/hw/i386/pc_piix.c:256
#28 0x0000555555603ab2 in main (argc=<optimized out>, argv=<optimized out>,
envp=<optimized out>) at vl.c:4249
So the safety net is correctly preventing QEMU reading cipher
text as if it were plain text, during startup and aborting QEMU
to avoid bad usage of this data.
For added fun this bug only happens if the encrypted qcow2
file happens to have data written to the first cluster,
otherwise the cluster won't be allocated and so qcow2 would
not try the decryption routines at all, just return all 0's.
That no one even noticed, let alone reported, this bug that
has shipped in 2.4.0, 2.5.0 and 2.6.0 shows that the number
of actual users of encrypted qcow2 is approximately zero.
So rather than fix the crash, and backport it to stable
releases, just go ahead with what we have warned users about
and disable any use of qcow2 encryption in the system
emulators. qemu-img/qemu-io/qemu-nbd are still able to access
qcow2 encrypted images for the sake of data conversion.
In the future, qcow2 will gain support for the alternative
luks format, but when this happens it'll be using the
'-object secret' infrastructure for getting keys, which
avoids this problematic scenario entirely.
Signed-off-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: 244483e64ee726cc89a1e05bed2be0ed37071403
https://github.com/qemu/qemu/commit/244483e64ee726cc89a1e05bed2be0ed37071403
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
M block/mirror.c
M include/block/block.h
M trace-events
Log Message:
-----------
block: Byte-based bdrv_co_do_copy_on_readv()
In a first step to convert the common I/O path to work on bytes rather
than sectors, this converts the copy-on-read logic that is used by
bdrv_aligned_preadv().
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 49c0752600d22606b411ace75b22e65398999d95
https://github.com/qemu/qemu/commit/49c0752600d22606b411ace75b22e65398999d95
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
Log Message:
-----------
block: Prepare bdrv_aligned_preadv() for byte-aligned requests
This patch makes bdrv_aligned_preadv() ready to accept byte-aligned
requests. Note that this doesn't mean that such requests are actually
made. The caller still ensures that all requests are aligned to at least
512 bytes.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 9896c8765fdd916844596c3e6929b3c641e930b1
https://github.com/qemu/qemu/commit/9896c8765fdd916844596c3e6929b3c641e930b1
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
Log Message:
-----------
block: Prepare bdrv_aligned_pwritev() for byte-aligned requests
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 2174f12bdeb3974141784e14bbb7ad8c53178cd9
https://github.com/qemu/qemu/commit/2174f12bdeb3974141784e14bbb7ad8c53178cd9
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/linux-aio.c
M block/raw-aio.h
M block/raw-posix.c
Log Message:
-----------
raw-posix: Switch to bdrv_co_* interfaces
In order to use the modern byte-based .bdrv_co_preadv/pwritev()
interface, this patch switches raw-posix to coroutine-based interfaces
as a first step. In terms of semantics and performance, it doesn't make
a difference with the existing code whether we go from a coroutine to a
callback-based interface already in block/io.c or only in linux-aio.c
As there have been concerns in the past that this change may be a step
in the wrong direction with respect to a possible AIO fast path, the
old callback-based interface for linux-aio is left around and can be
reactivated when a fast path (e.g. directly from virtio-blk dataplane,
bypassing the whole block layer) is implemented.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 9d52aa3c38484703c05e791bac1ff588588a217c
https://github.com/qemu/qemu/commit/9d52aa3c38484703c05e791bac1ff588588a217c
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/linux-aio.c
M block/raw-aio.h
M block/raw-posix.c
Log Message:
-----------
raw-posix: Implement .bdrv_co_preadv/pwritev
The raw-posix block driver actually supports byte-aligned requests now
on non-O_DIRECT images, like it already (and previously incorrectly)
claimed in bs->request_alignment.
For some block drivers this means that a RMW cycle can be avoided when
they write sub-sector metadata e.g. for cluster allocation.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 23b0d9fb1dd39d85fc2e0cabba5cbe005126e7b5
https://github.com/qemu/qemu/commit/23b0d9fb1dd39d85fc2e0cabba5cbe005126e7b5
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block.c
M block/io.c
Log Message:
-----------
block: Don't enforce 512 byte minimum alignment
If block drivers say that they can do an alignment < 512 bytes, let's
just suppose they mean it. raw-posix used to be an offender with respect
to this, but it can actually deal with byte-aligned requests now.
The default is still 512 bytes for any drivers that only implement
sector-based interfaces, but it is 1 now for drivers that implement
.bdrv_co_preadv.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: ccb9dc10129954d0bcd7814298ed445e684d5a2a
https://github.com/qemu/qemu/commit/ccb9dc10129954d0bcd7814298ed445e684d5a2a
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/linux-aio.c
Log Message:
-----------
linux-aio: Cancel BH if not needed
linux-aio uses a BH in order to make sure that the remaining completions
are processed even in nested event loops of completion callbacks in
order to avoid deadlocks.
There is no need, however, to have the BH overhead for the first call
into qemu_laio_completion_bh() or after all pending completions have
already been processed. Therefore, this patch calls directly into
qemu_laio_completion_bh() in qemu_laio_completion_cb() and cancels
the BH after qemu_laio_completion_bh() has processed all pending
completions.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Commit: 48bea965724fafd51b395f4c0b5a0c173de46c2b
https://github.com/qemu/qemu/commit/48bea965724fafd51b395f4c0b5a0c173de46c2b
Author: Thomas Huth <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M tests/qemu-iotests/README
Log Message:
-----------
doc: Fix mailing list address in tests/qemu-iotests/README
The address of the mailing list is address@hidden
instead of address@hidden And while we're
at it, also mention the qemu-block mailing list here.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Commit: f1e8474115d6be7eda14092050ffa2b031afb729
https://github.com/qemu/qemu/commit/f1e8474115d6be7eda14092050ffa2b031afb729
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
M include/block/block.h
Log Message:
-----------
block: Introduce bdrv_preadv()
We already have a byte-based bdrv_pwritev(), but the read counterpart
was still missing. This commit adds it.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 5ddda0b8f0c07c8082c87d248c8eb23f43fd44a1
https://github.com/qemu/qemu/commit/5ddda0b8f0c07c8082c87d248c8eb23f43fd44a1
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
M block/qcow2.c
M block/sheepdog.c
M include/block/block.h
M include/block/block_int.h
Log Message:
-----------
block: Make .bdrv_load_vmstate() vectored
This brings it in line with .bdrv_save_vmstate().
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: b433d9424d271ce68f592590f77dc2b30944d3a5
https://github.com/qemu/qemu/commit/b433d9424d271ce68f592590f77dc2b30944d3a5
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
Log Message:
-----------
block: Allow .bdrv_load/save_vmstate() to return 0/-errno
The return value of .bdrv_load/save_vmstate() can be any non-negative
number in case of success now. It used to be bytes/-errno.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 1a8ae8221799901dc399a174b52a970d8e6f976a
https://github.com/qemu/qemu/commit/1a8ae8221799901dc399a174b52a970d8e6f976a
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
M include/block/block_int.h
Log Message:
-----------
block: Make bdrv_load/save_vmstate coroutine_fns
This allows drivers to share code between normal I/O and vmstate
accesses.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 734a77584ae13d36113a7a7cd8b54beb49a8a48e
https://github.com/qemu/qemu/commit/734a77584ae13d36113a7a7cd8b54beb49a8a48e
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/qcow2.c
Log Message:
-----------
qcow2: Let vmstate call qcow2_co_preadv/pwrite directly
We don't really want to go through the block layer in order to read from
or write to the vmstate in a qcow2 image. Doing so required a few ugly
hacks like saving and restoring the old image size (because writing to
vmstate offsets would increase the image size) or disabling the "reads
after EOF = zeroes" logic. When calling the right functions directly,
these hacks aren't necessary any more.
Note that .bdrv_vmstate_load/save() return 0 instead of the number of
bytes in case of success now.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: c9d20029f43a08c6362a655c2c5272612186a004
https://github.com/qemu/qemu/commit/c9d20029f43a08c6362a655c2c5272612186a004
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block.c
M block/io.c
M include/block/block_int.h
Log Message:
-----------
block: Remove bs->zero_beyond_eof
It is always true for open images now.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Commit: 418690447a5340050e64efc3c811fd30d9e96e5b
https://github.com/qemu/qemu/commit/418690447a5340050e64efc3c811fd30d9e96e5b
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block.c
Log Message:
-----------
block: Fix snapshot=on with aio=native
snapshot=on creates a temporary overlay that is always opened with
cache=unsafe (the cache mode specified by the user is only for the
actual image file and its children). This means that we must not inherit
the BDRV_O_NATIVE_AIO flag for the temporary overlay because trying to
use Linux AIO with cache=unsafe results in an error.
Reproducer without this patch:
$ x86_64-softmmu/qemu-system-x86_64 -drive
file=/tmp/test.qcow2,cache=none,aio=native,snapshot=on
qemu-system-x86_64: -drive
file=/tmp/test.qcow2,cache=none,aio=native,snapshot=on: aio=native was
specified, but it requires cache.direct=on, which was not specified.
Signed-off-by: Kevin Wolf <address@hidden>
Commit: eb1364ceac3d62f69701d00383b3052a9bdb0df7
https://github.com/qemu/qemu/commit/eb1364ceac3d62f69701d00383b3052a9bdb0df7
Author: Alberto Garcia <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/io.c
Log Message:
-----------
block: use the block job list in bdrv_drain_all()
bdrv_drain_all() pauses all block jobs by using bdrv_next() to iterate
over all top-level BlockDriverStates. Therefore the code is unable to
find block jobs in other nodes.
This patch uses block_job_next() to iterate over all block jobs.
Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: f0f55deda2ac3c742d1dc67526d8834a50870285
https://github.com/qemu/qemu/commit/f0f55deda2ac3c742d1dc67526d8834a50870285
Author: Alberto Garcia <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M blockdev.c
Log Message:
-----------
block: use the block job list in qmp_query_block_jobs()
qmp_query_block_jobs() uses bdrv_next() to look for block jobs, but
this function can only find those in top-level BlockDriverStates.
This patch uses block_job_next() instead.
Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 0824afda0cd20045ffe87d58e142774514b61026
https://github.com/qemu/qemu/commit/0824afda0cd20045ffe87d58e142774514b61026
Author: Alberto Garcia <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M blockjob.c
Log Message:
-----------
block: Prevent sleeping jobs from resuming if they have been paused
If we pause a block job and drain its BlockDriverState we want that
the job remains inactive until we call block_job_resume() again.
However if we pause the job while it is sleeping then it will resume
when the sleep timer fires.
This patch prevents that from happening by checking if the job has
been paused after it comes back from sleeping.
Signed-off-by: Alberto Garcia <address@hidden>
Suggested-by: Kevin Wolf <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 834fe28ddffaec469cf048c7a48eb610e7a6e906
https://github.com/qemu/qemu/commit/834fe28ddffaec469cf048c7a48eb610e7a6e906
Author: Alberto Garcia <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/commit.c
Log Message:
-----------
block: Create the commit block job before reopening any image
If the base or overlay images need to be reopened in read-write mode
but the block_job_create() call fails then no one will put those
images back in read-only mode.
We can solve this problem easily by calling block_job_create() first.
Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 6ea66b590cda71bddc3112b40a5c13378c1a3445
https://github.com/qemu/qemu/commit/6ea66b590cda71bddc3112b40a5c13378c1a3445
Author: Fam Zheng <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M tests/qemu-iotests/095
Log Message:
-----------
iotests: 095: Clean up QEMU before showing image info
Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: 87cd3d20e1e9b31315bf416d6e720cf7e3eb2ea9
https://github.com/qemu/qemu/commit/87cd3d20e1e9b31315bf416d6e720cf7e3eb2ea9
Author: Vikhyat Umrao <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/rbd.c
Log Message:
-----------
rbd:change error_setg() to error_setg_errno()
Ceph RBD block driver does not use error_setg_errno() where
it is possible to use. This patch replaces error_setg()
from error_setg_errno().
Signed-off-by: Vikhyat Umrao <address@hidden>
Message-id: address@hidden
Reviewed-by: Josh Durgin <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 9bd910e2cbe413ab5927068bf189e929cb6790bc
https://github.com/qemu/qemu/commit/9bd910e2cbe413ab5927068bf189e929cb6790bc
Author: Max Reitz <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block.c
Log Message:
-----------
block: Allow replacement of a BDS by its overlay
change_parent_backing_link() asserts that the BDS to be replaced is not
used as a backing file. However, we may want to replace a BDS by its
overlay in which case that very link should not be redirected.
For instance, when doing a sync=none drive-mirror operation, we may have
the following BDS/BB forest before block job completion:
target
base <- source <- BlockBackend
During job completion, we want to establish the source BDS as the
target's backing node:
target
|
v
base <- source <- BlockBackend
This makes the target a valid replacement for the source:
target <- BlockBackend
|
v
base <- source
Without this modification to change_parent_backing_link() we have to
inject the target into the graph before the source is its backing node,
thus temporarily creating a wrong graph:
target <- BlockBackend
base <- source
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 274fccee2bf63702b34e3923b1e50a49147a7918
https://github.com/qemu/qemu/commit/274fccee2bf63702b34e3923b1e50a49147a7918
Author: Max Reitz <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block.c
M block/mirror.c
M blockdev.c
M include/block/block_int.h
Log Message:
-----------
block/mirror: Fix target backing BDS
Currently, we are trying to move the backing BDS from the source to the
target in bdrv_replace_in_backing_chain() which is called from
mirror_exit(). However, mirror_complete() already tries to open the
target's backing chain with a call to bdrv_open_backing_file().
First, we should only set the target's backing BDS once. Second, the
mirroring block job has a better idea of what to set it to than the
generic code in bdrv_replace_in_backing_chain() (in fact, the latter's
conditions on when to move the backing BDS from source to target are not
really correct).
Therefore, remove that code from bdrv_replace_in_backing_chain() and
leave it to mirror_complete().
Depending on what kind of mirroring is performed, we furthermore want to
use different strategies to open the target's backing chain:
- If blockdev-mirror is used, we can assume the user made sure that the
target already has the correct backing chain. In particular, we should
not try to open a backing file if the target does not have any yet.
- If drive-mirror with mode=absolute-paths is used, we can and should
reuse the already existing chain of nodes that the source BDS is in.
In case of sync=full, no backing BDS is required; with sync=top, we
just link the source's backing BDS to the target, and with sync=none,
we use the source BDS as the target's backing BDS.
We should not try to open these backing files anew because this would
lead to two BDSs existing per physical file in the backing chain, and
we would like to avoid such concurrent access.
- If drive-mirror with mode=existing is used, we have to use the
information provided in the physical image file which means opening
the target's backing chain completely anew, just as it has been done
already.
If the target's backing chain shares images with the source, this may
lead to multiple BDSs per physical image file. But since we cannot
reliably ascertain this case, there is nothing we can do about it.
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 67882b153544f7b29412a5bdf40dd3bbba8d64ae
https://github.com/qemu/qemu/commit/67882b153544f7b29412a5bdf40dd3bbba8d64ae
Author: Max Reitz <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block/null.c
Log Message:
-----------
block/null: Implement bdrv_refresh_filename()
The null block driver ignores any filename used for creating its BDSs,
which allows creating such BDSs even without any filename at all. In
that case, we currently construct a JSON filename when queried instead
of a plain "null-co://" or "null-aio://". This patch implements
bdrv_refresh_filename() to remedy this behavior.
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
address@hidden: Added commit message]
Signed-off-by: Max Reitz <address@hidden>
Commit: 298c6009dc79dc0cc71cab4a1ad9f8231c1ae858
https://github.com/qemu/qemu/commit/298c6009dc79dc0cc71cab4a1ad9f8231c1ae858
Author: Max Reitz <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
A tests/qemu-iotests/155
A tests/qemu-iotests/155.out
M tests/qemu-iotests/group
Log Message:
-----------
iotests: Add test for post-mirror backing chains
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Fam Zheng <address@hidden>
address@hidden: Removed unnecessary imports]
Signed-off-by: Max Reitz <address@hidden>
Commit: 3dd48fdc55613c102f2811c63ceefd9aebcd44ca
https://github.com/qemu/qemu/commit/3dd48fdc55613c102f2811c63ceefd9aebcd44ca
Author: Max Reitz <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
A tests/qemu-iotests/156
A tests/qemu-iotests/156.out
M tests/qemu-iotests/group
Log Message:
-----------
iotests: Add test for oVirt-like storage migration
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 0e321191224c8cd137eef41da3257e096965c3d6
https://github.com/qemu/qemu/commit/0e321191224c8cd137eef41da3257e096965c3d6
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M util/hbitmap.c
Log Message:
-----------
hbitmap: add 'pos < size' asserts
For now, fail in hbitmap_set on start + count > size will come from
hbitmap_set
hb_count_between
hbitmap_iter_init
assert(pos < hb->size)
This patch adds such checks to set/get/reset functions of hbitmap.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: 60251f4d3ecfc705c137ff505aaf7c46f31cb91b
https://github.com/qemu/qemu/commit/60251f4d3ecfc705c137ff505aaf7c46f31cb91b
Author: Kevin Wolf <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block.c
M block/commit.c
M block/io.c
M block/mirror.c
M block/null.c
M block/rbd.c
M blockdev.c
M blockjob.c
M include/block/block_int.h
M tests/qemu-iotests/095
A tests/qemu-iotests/155
A tests/qemu-iotests/155.out
A tests/qemu-iotests/156
A tests/qemu-iotests/156.out
M tests/qemu-iotests/group
M util/hbitmap.c
Log Message:
-----------
Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-06-16'
into queue-block
Block patches
# gpg: Signature made Thu Jun 16 15:21:35 2016 CEST
# gpg: using RSA key 0x3BB14202E838ACAD
# gpg: Good signature from "Max Reitz <address@hidden>"
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40
# Subkey fingerprint: 58B3 81CE 2DC8 9CF9 9730 EE64 3BB1 4202 E838 ACAD
* mreitz/tags/pull-block-for-kevin-2016-06-16:
hbitmap: add 'pos < size' asserts
iotests: Add test for oVirt-like storage migration
iotests: Add test for post-mirror backing chains
block/null: Implement bdrv_refresh_filename()
block/mirror: Fix target backing BDS
block: Allow replacement of a BDS by its overlay
rbd:change error_setg() to error_setg_errno()
iotests: 095: Clean up QEMU before showing image info
block: Create the commit block job before reopening any image
block: Prevent sleeping jobs from resuming if they have been paused
block: use the block job list in qmp_query_block_jobs()
block: use the block job list in bdrv_drain_all()
Signed-off-by: Kevin Wolf <address@hidden>
Commit: dc278c58fa02e5fb796dbacf02c8dde32f697015
https://github.com/qemu/qemu/commit/dc278c58fa02e5fb796dbacf02c8dde32f697015
Author: Peter Maydell <address@hidden>
Date: 2016-06-16 (Thu, 16 Jun 2016)
Changed paths:
M block.c
M block/commit.c
M block/io.c
M block/linux-aio.c
M block/mirror.c
M block/null.c
M block/qcow.c
M block/qcow2-cluster.c
M block/qcow2.c
M block/qcow2.h
M block/raw-aio.h
M block/raw-posix.c
M block/rbd.c
M block/sheepdog.c
M blockdev.c
M blockjob.c
M hmp.c
M hw/block/m25p80.c
M include/block/block.h
M include/block/block_int.h
M qemu-img.c
M tests/qemu-iotests/087.out
M tests/qemu-iotests/095
A tests/qemu-iotests/155
A tests/qemu-iotests/155.out
A tests/qemu-iotests/156
A tests/qemu-iotests/156.out
M tests/qemu-iotests/README
M tests/qemu-iotests/group
M trace-events
M util/hbitmap.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Thu 16 Jun 2016 15:01:27 BST
# gpg: using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <address@hidden>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* remotes/kevin/tags/for-upstream: (39 commits)
hbitmap: add 'pos < size' asserts
iotests: Add test for oVirt-like storage migration
iotests: Add test for post-mirror backing chains
block/null: Implement bdrv_refresh_filename()
block/mirror: Fix target backing BDS
block: Allow replacement of a BDS by its overlay
rbd:change error_setg() to error_setg_errno()
iotests: 095: Clean up QEMU before showing image info
block: Create the commit block job before reopening any image
block: Prevent sleeping jobs from resuming if they have been paused
block: use the block job list in qmp_query_block_jobs()
block: use the block job list in bdrv_drain_all()
block: Fix snapshot=on with aio=native
block: Remove bs->zero_beyond_eof
qcow2: Let vmstate call qcow2_co_preadv/pwrite directly
block: Make bdrv_load/save_vmstate coroutine_fns
block: Allow .bdrv_load/save_vmstate() to return 0/-errno
block: Make .bdrv_load_vmstate() vectored
block: Introduce bdrv_preadv()
doc: Fix mailing list address in tests/qemu-iotests/README
...
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/a66370b08d53...dc278c58fa02
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] b2f65d: qcow2: Work with bytes in qcow2_get_cluster_offset...,
GitHub <=