Hmm, stop. Very bad thing (sorry, that I didn't realize it before):
This breaks my dirty bitmap migration series with its meta bitmaps. Meta
bitmap is an additional HBitmap in BdrvDirtyBitmap, which tracks
dirtiness of this BdrvDirtyBitmap. And it (meta bitmap) have its own
granularity of
Signed-off-by: Fam Zheng
---
block/vdi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/vdi.c b/block/vdi.c
index 2199fd3..6b1a57b 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -550,6 +550,7 @@ static int64_t coroutine_fn
vdi_co_get_block_status(BlockDriverState *bs,
The "flags" bit mask is expanded to two booleans, "data" and "zero";
"bs" is replaced with "filename" string.
Signed-off-by: Fam Zheng
---
qapi/block-core.json | 28
qemu-img.c | 48 ++--
2 files
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/059 | 10 ++
tests/qemu-iotests/059.out | 38 ++
2 files changed, 48 insertions(+)
diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
index 0ded0c3..261d8b0 100755
---
A visible improvement is that "filename" is now included in the output
if it's valid.
Signed-off-by: Fam Zheng
---
qemu-img.c | 39 ---
tests/qemu-iotests/122.out | 96 ++
2 files changed, 79
Reviewed-by: Eric Blake
Signed-off-by: Fam Zheng
---
block/iscsi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/iscsi.c b/block/iscsi.c
index 2d1e230..8c7f1b3 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -625,6 +625,9 @@ out:
if
Reviewed-by: Eric Blake
Signed-off-by: Fam Zheng
---
block/raw-posix.c | 1 +
block/raw_bsd.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 2cd7d68..9988aa4 100644
--- a/block/raw-posix.c
+++
Reviewed-by: Eric Blake
Signed-off-by: Fam Zheng
---
block/qcow.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/qcow.c b/block/qcow.c
index 558f443..b59383f 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -509,6 +509,7 @@ static int64_t
Signed-off-by: Fam Zheng
---
block/sheepdog.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 0f6789e..d5e7ff8 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -2740,6 +2740,9 @@ sd_co_get_block_status(BlockDriverState *bs,
Signed-off-by: Fam Zheng
---
block/qcow2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index 836888c..7634c42 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1302,6 +1302,7 @@ static int64_t coroutine_fn
v2: Add Eric's rev-by in patches 2, 4, 5.
01: Refering -> referring in commit message. [Eric]
Recurse to "file" for sensible "zero" flag. [Paolo]
12: New. Make MapEntry a QAPI struct. [Paolo, Markus]
I stumbled upon this when looking at external bitmap formats.
Current "qemu-img
Signed-off-by: Fam Zheng
---
block/qed.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/qed.c b/block/qed.c
index a6bbd8b..03af9c1 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -692,6 +692,7 @@ typedef struct {
uint64_t pos;
int64_t status;
int
Signed-off-by: Fam Zheng
---
block/vmdk.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index f5a56fd..b60a5af 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1265,6 +1265,7 @@ static int64_t coroutine_fn
Signed-off-by: Fam Zheng
---
block/vpc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/vpc.c b/block/vpc.c
index 912f5d0..412ff41 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -588,6 +588,7 @@ static int64_t coroutine_fn
vpc_co_get_block_status(BlockDriverState
On Tue, 11/24 12:12, Vladimir Sementsov-Ogievskiy wrote:
> On 24.11.2015 05:28, Fam Zheng wrote:
> >On Mon, 11/23 16:34, John Snow wrote:
> >>Hmm, what's the idea, here?
> >>
> >>This patch does a lot more than just hide hbitmap details from callers
> >>of block_dirty_bitmap functions.
> >>
> >>So
On Nov 24, 2015, at 9:38 AM, Kevin Wolf wrote:
>
>
>> +/* If using a physical device */
>> +if (strstart(filename, "/dev/", NULL)) {
>> +char bsdPath[MAXPATHLEN];
>> +
>> +/* If the physical device is a cdrom */
>> +if (strcmp(filename, "/dev/cdrom") == 0) {
>
>
"s->bitmap" tracks done sectors, we only check bit states without using any
iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and
more memory efficient.
Meanwhile, rename it to done_bitmap, to reflect the intention.
Signed-off-by: Fam Zheng
Reviewed-by:
v3: Split patch 2. [Vladimir]
v2: bitmap_set -> set_bit. [Congyang, Paolo, John]
Add John Snow's rev-by with that change.
This makes a cleaner base for more dirty bitmap work. "granularity" appearing
with different representations have always been mind twisting, remove it from
HBitmap to
HBitmap is an implementation detail of block dirty bitmap that should be hidden
from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying
HBitmapIter.
A small difference in the interface is, before, an HBitmapIter is initialized
in place, now the new BdrvDirtyBitmapIter must be
BdrvDirtyBitmap has to know about granularity because it's in the API,
but currently the logic is in HBitmap. Because HBitmap has a delicate
implementation that has a multi-layer array of arrays of different
granularities, handling the "bit granularity" there only makes it harder
to understand.
Now all callers except the test code use zero, drop the parameter to
make the interface cleaner and more intuitive.
Test code of hbitmap granularity is removed together.
Signed-off-by: Fam Zheng
---
block.c| 4 +-
include/qemu/hbitmap.h | 20 +
Mac OS X can be picky when it comes to allowing the user
to use physical devices in QEMU. Most mounted volumes
appear to be off limits to QEMU. If an issue is detected,
a message is displayed showing the user how to unmount a
volume.
Signed-off-by: John Arbuckle
---
The added parameter can be used to return the BDS pointer which the
valid offset is referring to. It's value should be ignored unless
BDRV_BLOCK_OFFSET_VALID in ret is set.
Until block drivers fill in the right value, let's clear it explicitly
right before calling .bdrv_get_block_status.
Signed-off-by: Fam Zheng
---
block/parallels.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/parallels.c b/block/parallels.c
index d1146f1..6552f32 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -273,6 +273,7 @@ static int64_t coroutine_fn
Signed-off-by: Paolo Bonzini
---
docs/multiple-iothreads.txt | 5 ++---
include/block/aio.h | 24 +++-
2 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/docs/multiple-iothreads.txt b/docs/multiple-iothreads.txt
index
Signed-off-by: Paolo Bonzini
---
aio-posix.c | 26 --
aio-win32.c | 26 --
2 files changed, 24 insertions(+), 28 deletions(-)
diff --git a/aio-posix.c b/aio-posix.c
index 482b316..370fefe 100644
--- a/aio-posix.c
+++
This is simpler than taking and releasing the AioContext lock.
Signed-off-by: Paolo Bonzini
---
block/quorum.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/block/quorum.c b/block/quorum.c
index b9ba028..3b19c9e 100644
--- a/block/quorum.c
Signed-off-by: Paolo Bonzini
---
aio-posix.c | 4
aio-win32.c | 6 --
block/curl.c| 16 +++---
block/iscsi.c | 4
block/nbd-client.c | 14 ++--
Signed-off-by: Paolo Bonzini
---
block/archipelago.c| 3 ---
block/blkdebug.c | 4 ---
block/blkverify.c | 9 +++
block/block-backend.c | 4 ---
block/curl.c | 2 +-
block/io.c | 13 +-
block/iscsi.c | 2 --
Signed-off-by: Paolo Bonzini
---
dma-helpers.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/dma-helpers.c b/dma-helpers.c
index 68f6f07..b3e19ba 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -210,9 +210,25 @@ BlockAIOCB
Avoid entering the slow path of qemu_lockcnt_dec_and_lock if
no bottom half has to be deleted. If a bottom half deletes itself,
it will be picked up on the next visit of the list, or when the
AioContext itself is finalized.
Signed-off-by: Paolo Bonzini
---
async.c | 13
On 11/23/2015 10:22 PM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng
> ---
> block/iscsi.c | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Eric Blake
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 2d1e230..8c7f1b3 100644
> ---
On 11/23/2015 10:22 PM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng
> ---
> block/raw-posix.c | 1 +
> block/raw_bsd.c | 1 +
> 2 files changed, 2 insertions(+)
>
Reviewed-by: Eric Blake
--
Eric Blake eblake redhat com+1-919-301-3266
Libvirt
On 11/24/2015 07:17 AM, Alberto Garcia wrote:
> Commit 5f81724d made PIO read requests async but didn't add the
> relevant block_acct_failed() and block_acct_invalid() calls.
>
> Signed-off-by: Alberto Garcia
> ---
> hw/ide/atapi.c | 6 --
> 1 file changed, 4
Prepare for moving the allocation to virtqueue_pop.
Signed-off-by: Paolo Bonzini
---
hw/9pfs/virtio-9p-device.c | 7 +--
hw/9pfs/virtio-9p.c| 10 +++---
hw/9pfs/virtio-9p.h| 2 --
3 files changed, 4 insertions(+), 15 deletions(-)
diff --git
The next patch will make virtqueue_pop/vring_pop allocate memory for a
"subclass" of VirtQueueElement. For this to work, VirtQueueElement
must be the first field in the containing struct.
Signed-off-by: Paolo Bonzini
---
hw/9pfs/virtio-9p.h | 2 +-
This large series is basically all that I would like to get into 2.6.
It is a combination of several pieces of work on dataplane and
multithreaded block layer.
It's also a large part of why I would like someone else to look at
miscellaneous patches for a while (in case you've missed that). I
can
Build the addresses and s/g lists on the stack, and then copy them
to a VirtQueueElement that is just as big as required to contain this
particular s/g list. The cost of the copy is minimal compared to that
of a large malloc.
When virtqueue_map is used on the destination side of migration or on
Allocate the arrays for in_addr/out_addr/in_sg/out_sg outside the
VirtQueueElement. For now, virtqueue_pop and vring_pop keep
allocating a very large VirtQueueElement.
Signed-off-by: Paolo Bonzini
---
hw/virtio/dataplane/vring.c | 2 +-
hw/virtio/virtio.c | 60
The return code of virtqueue_pop/vring_pop is unused except to check for
errors or 0. We can thus easily move allocation inside the functions
and just return a pointer to the VirtQueueElement.
The advantage is that we will be able to allocate only the space that
is needed for the actual size of
Move allocation to virtio functions also when loading/saving a
VirtQueueElement. This will also let the load/save functions
keep backwards compatibility when the VirtQueueElement layout
is changed.
Signed-off-by: Paolo Bonzini
---
hw/block/virtio-blk.c | 10
Make the API more similar to the regular virtqueue API.
Signed-off-by: Paolo Bonzini
---
hw/block/dataplane/virtio-blk.c | 3 ++-
hw/virtio/dataplane/vring.c | 3 +--
include/hw/virtio/dataplane/vring.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
Build the addresses and s/g lists on the stack, and then copy them
to a VirtQueueElement that is just as big as required to contain this
particular s/g list. The cost of the copy is minimal compared to that
of a large malloc.
Signed-off-by: Paolo Bonzini
---
This will make it possible to walk the list of bottom halves without
holding the AioContext lock---and in turn to call bottom half
handlers without holding the lock.
Signed-off-by: Paolo Bonzini
---
async.c | 31 ++-
Signed-off-by: Paolo Bonzini
---
hw/virtio/virtio.c | 16
include/hw/virtio/virtio.h | 2 ++
2 files changed, 18 insertions(+)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 0e9fff6..c835451 100644
--- a/hw/virtio/virtio.c
+++
Signed-off-by: Paolo Bonzini
---
hw/virtio/virtio.c | 95 --
1 file changed, 93 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index fd63206..f5f8108 100644
--- a/hw/virtio/virtio.c
+++
This is complex, but I think it is reasonably documented in the source.
Signed-off-by: Paolo Bonzini
---
docs/lockcnt.txt | 9 +-
include/qemu/futex.h | 36 ++
include/qemu/thread.h| 3 +
trace-events | 10 ++
util/lockcnt.c |
Signed-off-by: Paolo Bonzini
---
docs/multiple-iothreads.txt | 65 +++--
1 file changed, 57 insertions(+), 8 deletions(-)
diff --git a/docs/multiple-iothreads.txt b/docs/multiple-iothreads.txt
index 4197f62..729c64b 100644
---
Signed-off-by: Paolo Bonzini
---
async.c | 2 --
block/archipelago.c | 3 +++
block/blkdebug.c | 4
block/blkverify.c | 3 +++
block/block-backend.c | 4
block/curl.c | 25 +
block/gluster.c | 2
Signed-off-by: Paolo Bonzini
---
hw/scsi/virtio-scsi-dataplane.c | 196 +---
hw/scsi/virtio-scsi.c | 51 ++-
include/hw/virtio/virtio-scsi.h | 21 +
3 files changed, 35 insertions(+), 233 deletions(-)
diff --git
This patch prepares for the removal of unnecessary lockcnt inc/dec pairs.
Extract the dispatching loop for file descriptor handlers into a new
function aio_dispatch_handlers, and then inline aio_dispatch into
aio_poll.
aio_dispatch can now become void.
Signed-off-by: Paolo Bonzini
In disabled mode, virtio-blk dataplane seems to be enabled, but flow
actually goes through the normal virtio path. This patch simplifies a bit
the handling of disabled mode. In disabled mode, virtio_blk_handle_output
might be called even if s->dataplane is not NULL.
This is a bit tricky,
GRecMutex is new in glib 2.32, so we cannot use it. Introduce
a recursive mutex in qemu-thread instead, which will be used
instead of RFifoLock.
Signed-off-by: Paolo Bonzini
---
include/qemu/thread-posix.h | 6 ++
include/qemu/thread-win32.h | 10 ++
It is simpler and a bit faster, and QEMU does not need the contention
callbacks (and thus the fairness) anymore.
Signed-off-by: Paolo Bonzini
---
async.c | 8 ++---
include/block/aio.h | 3 +-
include/qemu/rfifolock.h | 54
Signed-off-by: Paolo Bonzini
---
hw/virtio/Makefile.objs | 1 -
hw/virtio/dataplane/Makefile.objs | 1 -
hw/virtio/dataplane/vring.c | 547 --
include/hw/virtio/dataplane/vring-accessors.h | 75
Pull the increment/decrement pair out of aio_bh_poll and into the
callers.
Signed-off-by: Paolo Bonzini
---
aio-posix.c | 7 ++-
aio-win32.c | 9 ++---
async.c | 12 ++--
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/aio-posix.c
This will be used for AioHandlers too. There is going to be little
or no contention, so it is better to reuse the same lock.
Signed-off-by: Paolo Bonzini
---
async.c | 16
include/block/aio.h | 2 +-
2 files changed, 9 insertions(+), 9
Signed-off-by: Paolo Bonzini
---
aio-win32.c | 81 +
1 file changed, 49 insertions(+), 32 deletions(-)
diff --git a/aio-win32.c b/aio-win32.c
index a05cffe..fe89b20 100644
--- a/aio-win32.c
+++ b/aio-win32.c
@@
Signed-off-by: Paolo Bonzini
---
aio-posix.c | 2 --
aio-win32.c | 2 --
block/curl.c| 2 ++
block/iscsi.c | 2 ++
block/null.c| 4
block/qed.c | 2 ++
block/throttle-groups.c
On 11/23/2015 09:28 PM, Fam Zheng wrote:
> On Mon, 11/23 16:34, John Snow wrote:
>> Hmm, what's the idea, here?
>>
>> This patch does a lot more than just hide hbitmap details from callers
>> of block_dirty_bitmap functions.
>>
>> So we're changing the backing hbitmap to always be one where g=0
On 24.11.2015 05:28, Fam Zheng wrote:
On Mon, 11/23 16:34, John Snow wrote:
Hmm, what's the idea, here?
This patch does a lot more than just hide hbitmap details from callers
of block_dirty_bitmap functions.
So we're changing the backing hbitmap to always be one where g=0 and the
number of
On 11/23/2015 11:59 PM, Kevin Wolf wrote:
> Creating an empty drive while specifying 'format' doesn't make sense.
> The specified format driver would simply be ignored.
>
> Make a set 'format' option an indication that a non-empty drive should
> be created. This makes 'format' consistent with
Am 23.11.2015 um 22:15 hat Max Reitz geschrieben:
> On 23.11.2015 03:32, Fam Zheng wrote:
> > Otherwise, a window flashes on my desktop (built with SDL). Add this as
> > other cases have it.
> >
> > Signed-off-by: Fam Zheng
> >
> > ---
> > v2: Fix 119 too. [Max]
> > ---
> >
On 24/11/2015 07:29, Ming Lin wrote:
>> Here is new performance number:
>>
>> qemu-nvme + google-ext + eventfd: 294MB/s
>> virtio-blk: 344MB/s
>> virtio-scsi: 296MB/s
>>
>> It's almost same as virtio-scsi. Nice.
Pretty good indeed.
> Looks like "regular MMIO" runs in vcpu thread, while "eventfd
Am 21.11.2015 um 01:17 hat Programmingkid geschrieben:
> Add support for caching options that can be specified from
> the command line.
>
> Signed-off-by: John Arbuckle
Thanks, applied to the block branch.
Kevin
On 11/23/2015 10:21 PM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng
> ---
> block/qcow.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Eric Blake
>
> diff --git a/block/qcow.c b/block/qcow.c
> index 558f443..b59383f 100644
> --- a/block/qcow.c
> +++
On 24/11/2015 06:22, Fam Zheng wrote:
> case OFORMAT_JSON:
> -printf("%s{ \"start\": %"PRId64", \"length\": %"PRId64", \"depth\":
> %d,"
> - " \"zero\": %s, \"data\": %s",
> - (e->start == 0 ? "[" : ",\n"),
> - e->start, e->length,
Commit 5f81724d made PIO read requests async but didn't add the
relevant block_acct_failed() and block_acct_invalid() calls.
Signed-off-by: Alberto Garcia
---
hw/ide/atapi.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/ide/atapi.c
This was accidentally changed by commit 5f81724d
Signed-off-by: Alberto Garcia
---
hw/ide/atapi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 5e3791c..65f8dd4 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@
On 24/11/2015 06:21, Fam Zheng wrote:
> +if (bs->file && *file == bs->file->bs &&
This check is unnecessary, just use "if (file)".
Paolo
> (ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO) &&
> (ret & BDRV_BLOCK_OFFSET_VALID)) {
> +BlockDriverState *file2;
>
Paolo Bonzini writes:
> On 24/11/2015 06:22, Fam Zheng wrote:
>> case OFORMAT_JSON:
>> -printf("%s{ \"start\": %"PRId64", \"length\": %"PRId64", \"depth\":
>> %d,"
>> - " \"zero\": %s, \"data\": %s",
>> - (e->start == 0 ? "[" :
On Tue, 11/24 12:47, Paolo Bonzini wrote:
>
>
> On 24/11/2015 06:21, Fam Zheng wrote:
> > +if (bs->file && *file == bs->file->bs &&
>
> This check is unnecessary, just use "if (file)".
"file" would be bs in the case of protocol, and this function will infinitely
recurse.
Fam
On Tue, 11/24 21:25, Fam Zheng wrote:
> On Tue, 11/24 13:45, Markus Armbruster wrote:
> > Paolo Bonzini writes:
> >
> > > On 24/11/2015 06:22, Fam Zheng wrote:
> > >> case OFORMAT_JSON:
> > >> -printf("%s{ \"start\": %"PRId64", \"length\": %"PRId64",
> > >>
On 24/11/2015 14:30, Fam Zheng wrote:
> Or you mean we don't have to serialize the list in one go, instead we can
> serialize one MapEntry a time with QAPI like what we do now?
Yes, serializing the whole list in one go needs a visitor that can do
streaming. We can write the array manually, and
On 24/11/2015 13:50, Fam Zheng wrote:
> > > +if (bs->file && *file == bs->file->bs &&
> >
> > This check is unnecessary, just use "if (file)".
>
> "file" would be bs in the case of protocol, and this function will infinitely
> recurse.
Oh, that's right! But then I think we want to check
Am 24.11.2015 um 13:17 hat Alberto Garcia geschrieben:
> Commit 5f81724d made PIO read requests async but didn't add the
> relevant block_acct_failed() and block_acct_invalid() calls.
>
> Signed-off-by: Alberto Garcia
No cover letter? Also, adding CC to John.
Series:
On Tue 24 Nov 2015 01:47:52 PM CET, Kevin Wolf wrote:
> Am 24.11.2015 um 13:17 hat Alberto Garcia geschrieben:
>> Commit 5f81724d made PIO read requests async but didn't add the
>> relevant block_acct_failed() and block_acct_invalid() calls.
>>
>> Signed-off-by: Alberto Garcia
Am 24.11.2015 um 13:52 hat Alberto Garcia geschrieben:
> On Tue 24 Nov 2015 01:47:52 PM CET, Kevin Wolf wrote:
> > Am 24.11.2015 um 13:17 hat Alberto Garcia geschrieben:
> >> Commit 5f81724d made PIO read requests async but didn't add the
> >> relevant block_acct_failed() and
78 matches
Mail list logo