This is about the experience with asynchronous execution in Midori (a
research OS written at Microsoft in a C#-like language, which was later
turned into a playground for features to be added to C#):
http://joeduffyblog.com/2015/11/19/asynchronous-everything/
Some parts will definitely ring a
On 11/23/2015 05:19 PM, Fam Zheng wrote:
> On Mon, 11/23 17:01, Wen Congyang wrote:
>> On 11/20/2015 05:59 PM, Fam Zheng wrote:
>>> "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
On Thu, Jul 09, 2015 at 10:56:43AM +0100, Stefan Hajnoczi wrote:
> v2:
> * Default to IOV_MAX instead of INT_MAX [Peter Lieven]
>
> This series depends on "[PATCH] block/mirror: limit qiov to IOV_MAX elements".
>
> IOV_MAX has been hardcoded in several places since preadv()/pwritev()/etc
>
On 11/20/2015 05:59 PM, Fam Zheng wrote:
> "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.
>
>
On Mon, 11/23 17:01, Wen Congyang wrote:
> On 11/20/2015 05:59 PM, Fam Zheng wrote:
> > "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
On Mon, 11/23 17:24, Wen Congyang wrote:
> On 11/23/2015 05:19 PM, Fam Zheng wrote:
> > On Mon, 11/23 17:01, Wen Congyang wrote:
> >> On 11/20/2015 05:59 PM, Fam Zheng wrote:
> >>> "s->bitmap" tracks done sectors, we only check bit states without using
> >>> any
> >>> iterator which HBitmap is
On Fri, Nov 20, 2015 at 03:09:25PM -0700, Eric Blake wrote:
> On 11/20/2015 11:04 AM, Daniel P. Berrange wrote:
> > +
> > +static const char *base64_valid_chars =
> > +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
> > +
> > +static int
> >
On Fri, Nov 20, 2015 at 03:15:27PM -0700, Eric Blake wrote:
> On 11/20/2015 11:04 AM, Daniel P. Berrange wrote:
> > Add a 'keyid' parameter that refers to the ID of a
> > QCryptoSecret instance that provides the encryption key.
> >
> > $QEMU \
> > -object
On Mon, 11/23 08:33, Markus Armbruster wrote:
> Fam Zheng writes:
>
> > 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 11/23/2015 05:55 PM, Fam Zheng wrote:
> On Mon, 11/23 17:24, Wen Congyang wrote:
>> On 11/23/2015 05:19 PM, Fam Zheng wrote:
>>> On Mon, 11/23 17:01, Wen Congyang wrote:
On 11/20/2015 05:59 PM, Fam Zheng wrote:
> "s->bitmap" tracks done sectors, we only check bit states without using
On Wed, Nov 18, 2015 at 03:51:29PM +0100, Kevin Wolf wrote:
> Am 09.07.2015 um 11:56 hat Stefan Hajnoczi geschrieben:
> > v2:
> > * Default to IOV_MAX instead of INT_MAX [Peter Lieven]
> >
> > This series depends on "[PATCH] block/mirror: limit qiov to IOV_MAX
> > elements".
> >
> > IOV_MAX
"Daniel P. Berrange" writes:
> On Fri, Nov 20, 2015 at 03:09:25PM -0700, Eric Blake wrote:
>> On 11/20/2015 11:04 AM, Daniel P. Berrange wrote:
>> > +
>> > +static const char *base64_valid_chars =
>> > +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
On 23/11/2015 01:41, Fam Zheng wrote:
> "werror=report" would free the req in virtio_blk_handle_rw_error, we
> mustn't write to it in that case.
>
> Reported-by: Paolo Bonzini
> Signed-off-by: Fam Zheng
> ---
> hw/block/virtio-blk.c | 7 +++
> 1 file
On Mon, Nov 23, 2015 at 02:39:27PM +0100, Markus Armbruster wrote:
> "Daniel P. Berrange" writes:
>
> > On Fri, Nov 20, 2015 at 03:09:25PM -0700, Eric Blake wrote:
> >> On 11/20/2015 11:04 AM, Daniel P. Berrange wrote:
> >> > +
> >> > +static const char *base64_valid_chars =
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
---
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 coroutine_fn
On Mon, Nov 23, 2015 at 05:31:33PM +0100, Juan Quintela wrote:
> Wen Congyang wrote:
> > If we set migration speed in a very large value, block-migration will try
> > to read
> > all data to the memory. Because
> > (block_mig_state.submitted + block_mig_state.read_done)
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/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
+++ b/block/raw-posix.c
@@ -1873,6 +1873,7 @@ static int64_t
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
The added parameter can be used to return the BDS pointer which the
valid offset is refering 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.
I stumbled upon this when looking at external bitmap formats.
Current "qemu-img map" command only displays filename if the data is allocated
in bs (bs->file) itself, or in the backing chain. Otherwise, it displays an
unfriendly error message:
$ qemu-img create -f vmdk -o
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 04f0e87..d1406b1 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -273,6 +273,7 @@ static int64_t coroutine_fn
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/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,
Switch json output generation from hand-written to QDict encoder, so
that the coming str field will be properly escaped.
Iotest 122 output is updated accordingly.
Signed-off-by: Fam Zheng
---
qemu-img.c | 30 +++
tests/qemu-iotests/122.out | 96
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
The new "file" output parameter of bdrv_get_block_status tells which
file the valid offset is referring to, we can use the information and
output the filename.
The iotest 122 reference output is updated accordingly.
Signed-off-by: Fam Zheng
---
qemu-img.c | 12
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
Sometimes confused with the granularity with coarse levels in HBitmap, the
granularity in the hbitmap_alloc is not an essential concept of a bitmap. Now
that all callers except the test code use zero, it's possible to drop the
parameter to make the interface cleaner and more intuitive.
Test code
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 make the interface and
"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:
(to: Kevin and cc: qemu-block)
On Fri, Nov 13, 2015 at 02:17:28PM +0100, Ricard Wanderlöf wrote:
>
> For the "main area on file, oob in memory" case, fix the shifts so that
> we erase the correct number of pages.
>
> Signed-off-by: Ricard Wanderlöf
> ---
> hw/block/nand.c |
On Mon, 11/23 22:30, Eric Blake wrote:
> On 11/23/2015 10:21 PM, Fam Zheng wrote:
> > The added parameter can be used to return the BDS pointer which the
> > valid offset is refering to. It's value should be ignored unless
>
> s/refering/referring/
>
> > BDRV_BLOCK_OFFSET_VALID in ret is set.
>
On 11/23/2015 10:22 PM, Fam Zheng wrote:
> Switch json output generation from hand-written to QDict encoder, so
> that the coming str field will be properly escaped.
>
> Iotest 122 output is updated accordingly.
>
> Signed-off-by: Fam Zheng
> ---
> qemu-img.c |
On Mon, 11/23 22:42, Eric Blake wrote:
> On 11/23/2015 10:22 PM, Fam Zheng wrote:
> > +++ b/tests/qemu-iotests/122.out
> > @@ -49,12 +49,13 @@ read 65536/65536 bytes at offset 4194304
> > 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> > read 65536/65536 bytes at offset 8388608
> > 64
On 11/23/2015 11:59 PM, Kevin Wolf wrote:
> Some drivers have nested options (e.g. blkdebug rule arrays), which
> don't belong to a child node and shouldn't be removed. Don't remove all
> options with "." in their name, but check for the complete prefixes of
> actually existing child nodes.
>
>
On Mon, Nov 23, 2015 at 08:41:20AM +0800, Fam Zheng wrote:
> "werror=report" would free the req in virtio_blk_handle_rw_error, we
> mustn't write to it in that case.
>
> Reported-by: Paolo Bonzini
> Signed-off-by: Fam Zheng
> ---
> hw/block/virtio-blk.c |
On 11/24/2015 12:30 AM, Eric Blake wrote:
> On 11/22/2015 11:23 PM, Wen Congyang wrote:
>> The new QMP command name is x-blockdev-change. It justs for adding/removing
>
> s/It justs/It's just/
>
>> quorum's child now, and don't support all kinds of children, all kinds of
>
> s/don't/doesn't/
>
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 physical bits directly is
On Mon, Nov 23, 2015 at 08:34:44PM +0100, Paolo Bonzini wrote:
> This is about the experience with asynchronous execution in Midori (a
> research OS written at Microsoft in a C#-like language, which was later
> turned into a playground for features to be added to C#):
>
>
Just reopening the children (as block.c does now) is enough.
Signed-off-by: Kevin Wolf
---
block/blkdebug.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index bc0f041..459a3d9 100644
--- a/block/blkdebug.c
+++
On 23/11/2015 10:55, Fam Zheng wrote:
>>> Why? I think bitmap_set is a better match with bitmap_new below.
>>
>> set_bit() is quicker than bitmap_set() if you only set one bit.
>
> How much quicker is it? This doesn't sound convincing enough for me to lose
> the
> readability.
Substantially.
This patch adds a QemuOpts for generic block layer options to
bdrv_reopen_prepare(). The only two options that currently exist
(node-name and driver) cannot be changed, so the only thing we do is
putting them right back into the QDict so that we check at the end that
they are indeed unchanged.
We
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 'driver' and allows
using it with a block driver that
This adds the cache mode options to the QDict, so that they can be
specified for child nodes (e.g. backing.cache.direct=off).
The cache modes are not removed from the flags at this point; instead,
options and flags are kept in sync. If the user specifies both flags and
options, the options take
'node-name' and 'driver' should not be changed during a reopen
operation. It is, however, valid to specify them with the same value as
they already had.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
tests/qemu-iotests/133 | 90
Options are not actually inherited from the parent node yet, but this
commit lays the grounds for doing so.
Signed-off-by: Kevin Wolf
---
block.c | 52 ---
include/block/block_int.h | 3 ++-
2 files changed, 33
This is part three (or four, depending on whether you count the bdrv_swap
removal) of what I had sent earlier as "[PATCH 00/34] block: Cache mode for
children, reopen overhaul and more". Most of the patches were actually already
reviewed in v1.
This part contains the remaining functional changes
If the child was defined in the same context (-drive argument or
blockdev-add QMP command) as its parent, a reopen of the parent should
work the same and allow changing options of the child.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
block.c | 12
This fixes bdrv_reopen() calls like the following one:
qemu-io -c 'open -o overlap-check.template=all /tmp/test.qcow2' \
-c 'reopen -o overlap-check=none'
The approach taken so far would result in an options QDict that has both
"overlap-check.template=all" and "overlap-check=none", which
Some drivers have nested options (e.g. blkdebug rule arrays), which
don't belong to a child node and shouldn't be removed. Don't remove all
options with "." in their name, but check for the complete prefixes of
actually existing child nodes.
Signed-off-by: Kevin Wolf
---
bdrv_replace_in_backing_chain() asserts that not both old and new
BlockDdriverState have a BlockBackend attached to them because both
would have to end up pointing to the new BDS and we don't support more
than one BB per BDS yet.
Before we can safely allow references to existing nodes as backing
The next patch distinguishes options that were explicitly set and
options that were derived. bdrv_fill_option() added options of both
types: Options given by json: syntax should be counted as explicit, but
the rest is derived.
In preparation for the distinction, move json: parse to a separate
bs->options doesn't only contain options that the user explicitly
requested, but also option that were derived from flags, the filename or
inherited from the parent node.
For reopen, it is important to know the difference because reopening the
parent can change inherited values in child nodes,
For bs->file, using references to existing BDSes has been possible for a
while already. This patch enables the same for bs->backing_hd.
Signed-off-by: Kevin Wolf
---
block.c | 47 +--
block/mirror.c| 2 +-
qcow2 accepts a few driver-specific options that overlap semantically
(e.g. "overlap-check" is an alias of "overlap-check.template", and any
missing cache size option is derived from the given ones).
When bdrv_reopen() merges the set of updated options with left out
options that should be kept at
This is doing a more complete test on setting cache modes both while
opening an image (i.e. in a -drive command line) and in reopen
situations. It checks that reopen can specify options for child nodes
and that cache modes are correctly inherited from parent nodes where
they are not specified.
On 11/22/2015 11:23 PM, Wen Congyang wrote:
> The new QMP command name is x-blockdev-change. It justs for adding/removing
s/It justs/It's just/
> quorum's child now, and don't support all kinds of children, all kinds of
s/don't/doesn't/
> operations, nor all block drivers. So it is
On 23.11.2015 04:12, tu bo wrote:
> Hi Fam, Max:
>
> On 11/23/2015 10:33 AM, Fam Zheng wrote:
>> On Mon, 11/23 10:29, tu bo wrote:
>>> Hi Max:
>>>
>>> On 11/21/2015 12:17 AM, Max Reitz wrote:
On 20.11.2015 10:35, Fam Zheng wrote:
> Otherwise, a window flashes on my desktop (built with
Instead of passing a separate drv argument to bdrv_open_common(), just
make sure that a "driver" option is set in the QDict. This also means
that a "driver" entry is consistently present in bs->options now.
This is another step towards keeping all options in the QDict (which is
the represenation
This is a basic test for specifying cache modes for child nodes on the
command line. It doesn't take much time and works without O_DIRECT
support.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
---
tests/qemu-iotests/051 | 10 +++-
Specifying the cache mode for a driver without a medium is not a useful
thing to do: As long as there is no medium, the cache mode doesn't make
a difference, and once the 'change' command is used to insert a medium,
it ignores the old cache mode and makes the new medium use
cache=writethrough.
On 11/20/2015 04:59 AM, Fam Zheng wrote:
> "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.
>
>
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]
> ---
> tests/qemu-iotests/119 | 2 +-
> tests/qemu-iotests/120 | 2 +-
> 2
On 11/20/2015 04:59 AM, Fam Zheng wrote:
> 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
66 matches
Mail list logo