v7:
02: Fix rebase mishap.
04: Slight loop adjustment.
09: Fix constant on 32bit machines.
v6: Rebase.
02: Added documentation changes as suggested by Max.
v5: Rebase: first 5 patches from last revision are already merged.
Addressed Max's comments:
01: - "block.c" ->
From: Fam Zheng
We use a loop over bs->dirty_bitmaps to make sure the caller is
only releasing a bitmap owned by bs. Let's also assert that in this case
the caller is releasing a bitmap that does exist.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
From: Fam Zheng
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
From: Fam Zheng
The added group of operations enables tracking of the changed bits in
the dirty bitmap.
Signed-off-by: Fam Zheng
Reviewed-by: Max Reitz
Signed-off-by: John Snow
---
block/dirty-bitmap.c | 52
From: Fam Zheng
For dirty bitmap users to get the size and the name of a
BdrvDirtyBitmap.
Signed-off-by: Fam Zheng
Reviewed-by: John Snow
Reviewed-by: Max Reitz
Signed-off-by: John Snow
---
From: Fam Zheng
Signed-off-by: Fam Zheng
[Fixed minor constant issue. --js]
Signed-off-by: John Snow
Signed-off-by: John Snow
---
tests/test-hbitmap.c | 139 +++
1 file
From: Vladimir Sementsov-Ogievskiy
Functions to serialize / deserialize(restore) HBitmap. HBitmap should be
saved to linear sequence of bits independently of endianness and bitmap
array element (unsigned long) size. Therefore Little Endian is chosen.
These functions
Hi all!
This is a variant of existing test case which produces test failure.
It looks like the reason is:
one block job is in backup_complete, in synchronous bdrv_flush (success job)
other (job with injected io err) tries to synchronously cancel "success job"
It looks like some kind of
forget qemu-de...@nongnu.org.. add it.
On 19.07.2016 00:22, Vladimir Sementsov-Ogievskiy wrote:
Hi all!
This is a variant of existing test case which produces test failure.
It looks like the reason is:
one block job is in backup_complete, in synchronous bdrv_flush (success job)
other (job
On 14.07.2016 22:44, Eric Blake wrote:
> On 07/14/2016 07:28 AM, Kevin Wolf wrote:
>> In order to remove the necessity to use BlockBackend names in the
>> external API, we want to allow node-names everywhere. This converts
>> change-backing-file to accept a node-name without lifting the
>>
On 14.07.2016 15:28, Kevin Wolf wrote:
> In order to remove the necessity to use BlockBackend names in the
> external API, we want to allow node-names everywhere. This converts
> drive-mirror to accept a node-name without lifting the restriction that
> we're operating at a root node.
>
> In case
On 14.07.2016 15:28, Kevin Wolf wrote:
> In order to remove the necessity to use BlockBackend names in the
> external API, we want to allow node-names everywhere. This converts
> blockdev-backup and the corresponding transaction action to accept a
> node-name without lifting the restriction that
On Mon, Jul 18, 2016 at 12:05:49PM +0800, Cao jin wrote:
> No need duplicate the judgment, there is one in function entry.
>
> Cc: Stefan Hajnoczi
> Cc: Kevin Wolf
> Cc: Max Reitz
> Signed-off-by: Cao jin
>
On Fri, Jul 15, 2016 at 06:28:44PM +0800, Cao jin wrote:
> Parameter **errp of aio_context_setup() is useless, remove it
> and clean up the related code.
>
> Cc: Stefan Hajnoczi
> Cc: Fam Zheng
> Cc: Eric Blake
> Signed-off-by: Cao jin
On 18.07.2016 14:30, Halil Pasic wrote:
> Make raw_open for POSIX more consistent in handling errors by setting
> the error object also when qemu_open fails. The error object was
> generally set in case of errors, but I guess this case was overlooked.
> Do the same for win32.
>
> Signed-off-by:
On 15.07.2016 22:27, John Snow wrote:
> From: Fam Zheng
>
> The added group of operations enables tracking of the changed bits in
> the dirty bitmap.
>
> Signed-off-by: Fam Zheng
> Reviewed-by: Max Reitz
> Signed-off-by: John Snow
On 07/14/2016 08:19 PM, Vladimir Sementsov-Ogievskiy wrote:
Mirror can do up to 16 in-flight requests, but actually on full copy
(the whole source disk is non-zero) in-flight is always 1. This happens
as the request is not limited in size: the data occupies maximum available
capacity of s->buf.
On 15.07.2016 22:27, John Snow wrote:
> From: Fam Zheng
>
> Upon each bit toggle, the corresponding bit in the meta bitmap will be
> set.
>
> Signed-off-by: Fam Zheng
> [Amended text inline. --js]
>
> Signed-off-by: John Snow
> ---
>
On 07/18/2016 07:38 AM, Max Reitz wrote:
> On 14.07.2016 15:28, Kevin Wolf wrote:
>> In order to remove the necessity to use BlockBackend names in the
>> external API, we want to allow node-names everywhere. This converts
>> block-commit to accept a node-name without lifting the restriction that
On 15.07.2016 22:27, John Snow wrote:
> From: Vladimir Sementsov-Ogievskiy
>
> Several functions to provide necessary access to BdrvDirtyBitmap for
> block-migration.c
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> [Add the "finish"
On 07/18/2016 04:41 PM, Max Reitz wrote:
> On 18.07.2016 14:30, Halil Pasic wrote:
>> Make raw_open for POSIX more consistent in handling errors by setting
>> the error object also when qemu_open fails. The error object was
>> generally set in case of errors, but I guess this case was
On 18.07.2016 17:48, Halil Pasic wrote:
>
>
> On 07/18/2016 04:41 PM, Max Reitz wrote:
>> On 18.07.2016 14:30, Halil Pasic wrote:
>>> Make raw_open for POSIX more consistent in handling errors by setting
>>> the error object also when qemu_open fails. The error object was
>>> generally set in
On 15.07.2016 22:27, John Snow wrote:
> From: Fam Zheng
>
> Acked-by: John Snow
> Signed-off-by: Fam Zheng
> Signed-off-by: John Snow
> ---
> tests/test-hbitmap.c | 139
>
On 18.07.2016 18:13, Eric Blake wrote:
> On 07/18/2016 07:38 AM, Max Reitz wrote:
>> On 14.07.2016 15:28, Kevin Wolf wrote:
>>> In order to remove the necessity to use BlockBackend names in the
>>> external API, we want to allow node-names everywhere. This converts
>>> block-commit to accept a
On 07/14/2016 04:33 PM, Denis V. Lunev wrote:
This patchset contains patches dealing with known-to-be-zero areas in drive
mirror from [PATCH 0/9] major rework of drive-mirror patchset.
Changes from v2:
- added mirror_throttle helper (patch 3) to address Eric' comment about
last_time_ns
-
On 07/18/2016 10:57 AM, Max Reitz wrote:
> On 15.07.2016 22:27, John Snow wrote:
>> From: Fam Zheng
>>
>> The added group of operations enables tracking of the changed bits in
>> the dirty bitmap.
>>
>> Signed-off-by: Fam Zheng
>> Reviewed-by: Max Reitz
On 07/18/2016 05:57 PM, Max Reitz wrote:
> On 18.07.2016 17:48, Halil Pasic wrote:
>>
>>
>> On 07/18/2016 04:41 PM, Max Reitz wrote:
>>> On 18.07.2016 14:30, Halil Pasic wrote:
Make raw_open for POSIX more consistent in handling errors by setting
the error object also when qemu_open
From: Evgeny Yakovlev
The following sequence of tests discovered a problem in IDE emulation:
1. Send DMA write to IDE device 0
2. Send CMD_FLUSH_CACHE to same IDE device which will be failed by block
layer using blkdebug script in tests/ide-test:test_retry_flush
When
Changes from v7:
- fixed 026 test in cached mode (different output)
Changes from v6:
- squashed patches 5-6 into patch 4 to avoid test faults on git bissect
- changed sector number from 0 to 1 in patch 3
Changes from v5:
- Removed failed flush traces in block tests 026 071 089
- Changed
On 07/18/2016 12:28 PM, Max Reitz wrote:
> On 14.07.2016 21:03, Colin Lord wrote:
>> Modifies the bochs probe to return the format name as well as the
>> score as the final step of separating the probe function from the
>> driver. This keeps the probe completely independent of the driver,
>>
On 07/15/2016 09:47 AM, Denis V. Lunev wrote:
> From: Evgeny Yakovlev
>
> Some guests (win2008 server for example) do a lot of unnecessary
> flushing when underlying media has not changed. This adds additional
> overhead on host when calling fsync/fdatasync.
>
> This
On 07/18/2016 03:17 PM, Denis V. Lunev wrote:
> On 07/18/2016 10:10 PM, John Snow wrote:
>>
>> On 07/15/2016 09:47 AM, Denis V. Lunev wrote:
>>> From: Evgeny Yakovlev
>>>
>>> Some guests (win2008 server for example) do a lot of unnecessary
>>> flushing when underlying
From: Evgeny Yakovlev
Code to set and clear state associated with retry in moved into
ide_set_retry and ide_clear_retry to make adding retry setups easier.
Signed-off-by: Evgeny Yakovlev
Signed-off-by: Denis V. Lunev
On 07/18/2016 11:24 AM, Max Reitz wrote:
> On 15.07.2016 22:27, John Snow wrote:
>> From: Fam Zheng
>>
>> Acked-by: John Snow
>> Signed-off-by: Fam Zheng
>> Signed-off-by: John Snow
>> ---
>> tests/test-hbitmap.c | 139
On 07/18/2016 10:10 PM, John Snow wrote:
On 07/15/2016 09:47 AM, Denis V. Lunev wrote:
From: Evgeny Yakovlev
Some guests (win2008 server for example) do a lot of unnecessary
flushing when underlying media has not changed. This adds additional
overhead on host when
From: Evgeny Yakovlev
Some guests (win2008 server for example) do a lot of unnecessary
flushing when underlying media has not changed. This adds additional
overhead on host when calling fsync/fdatasync.
This change introduces a write generation scheme in
From: Evgeny Yakovlev
Due to changes in flush behaviour clean disks stopped generating
flush_to_disk events and IDE and AHCI tests that test flush commands
started to fail.
This change adds additional DMA writes to affected tests before sending
flush commands so that
On 07/18/2016 03:39 PM, Denis V. Lunev wrote:
> Changes from v7:
> - fixed 026 test in cached mode (different output)
>
> Changes from v6:
> - squashed patches 5-6 into patch 4 to avoid test faults on git bissect
> - changed sector number from 0 to 1 in patch 3
>
> Changes from v5:
> - Removed
From: Fam Zheng
Upon each bit toggle, the corresponding bit in the meta bitmap will be
set.
Signed-off-by: Fam Zheng
[Amended text inline. --js]
Reviewed-by: Max Reitz
Signed-off-by: John Snow
---
include/qemu/hbitmap.h
From: Fam Zheng
Signed-off-by: Fam Zheng
Reviewed-by: John Snow
Reviewed-by: Max Reitz
Signed-off-by: John Snow
---
tests/test-hbitmap.c | 116 +++
1 file
From: Fam Zheng
Callers can create an iterator of meta bitmap with
bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on
it. Meta iterators are also counted by bitmap->active_iterators.
Also add a couple of functions to retrieve granularity and count.
From: Vladimir Sementsov-Ogievskiy
Several functions to provide necessary access to BdrvDirtyBitmap for
block-migration.c
Signed-off-by: Vladimir Sementsov-Ogievskiy
[Add the "finish" parameters. - Fam]
Signed-off-by: Fam Zheng
Rather than open-coding each option request, it's easier to
have common helper functions do the work. That in turn requires
having convenient packed types for handling option requests
and replies.
Signed-off-by: Eric Blake
---
v4: rebase
v3: rebase, tweak a debug message
---
On Mon, 07/18 22:07, Eric Blake wrote:
> Rather than open-coding NBD_REP_SERVER, reuse the code we
> already have by adding a length parameter. Additionally,
> the refactoring will make adding NBD_OPT_GO in a later patch
> easier.
>
> Signed-off-by: Eric Blake
>
> ---
> v4:
From: "Dr. David Alan Gilbert"
Forcibly convert it to a vmstate wrapper; proper conversion
comes later.
Signed-off-by: Dr. David Alan Gilbert
Reviewed-by: Cornelia Huck
Reviewed-by: Michael S. Tsirkin
On Mon, 07/18 22:07, Eric Blake wrote:
> nbd/server.c | 78
> +---
> 1 file changed, 59 insertions(+), 19 deletions(-)
>
> diff --git a/nbd/server.c b/nbd/server.c
> index c8716f1..ad31c4a 100644
> --- a/nbd/server.c
> +++ b/nbd/server.c
>
On 06/27/2016 06:16 AM, Paolo Bonzini wrote:
>
>
> On 26/06/2016 00:15, Eric Blake wrote:
>> +/* Return -1 if unrecoverable error occurs
>> , 0 if NBD_OPT_LIST is unsupported,
>
> These two should return errp != NULL and negative errno.
Not quite. It returns 0 if nbd_handle_reply_err()
Upstream NBD protocol recently added the ability to efficiently
write zeroes without having to send the zeroes over the wire,
along with a flag to control whether the client wants a hole.
Signed-off-by: Eric Blake
---
v4: rebase, fix value for constant
v3: abandon
NBD commit 6d34500b clarified how clients and servers are supposed
to behave before closing a connection. It added NBD_REP_ERR_SHUTDOWN
(for the server to announce it is about to go away during option
haggling, so the client should quit sending NBD_OPT_* other than
NBD_OPT_ABORT) and ESHUTDOWN
The NBD spec says that a client should send NBD_OPT_ABORT
rather than just dropping the connection, if the client doesn't
like something the server sent during option negotiation. This
is a best-effort attempt only, and can only be done in places
where we know the server is still in sync with
Rather than asserting that nbdflags is within range, just give
it the correct type to begin with :) nbdflags corresponds to
the per-export portion of NBD Protocol "transmission flags", which
is 16 bits in response to NBD_OPT_EXPORT_NAME and NBD_OPT_GO.
Furthermore, upstream NBD has never passed
The NBD Protocol allows us to send human-readable messages
along with any NBD_REP_ERR error during option negotiation;
make use of this fact for clients that know what to do with
our message.
Signed-off-by: Eric Blake
---
v5: don't leak 'msg'
v4: new patch
---
nbd/server.c |
The NBD protocol allows servers to advertise a human-readable
description alongside an export name during NBD_OPT_LIST. Add
an option to pass through the user's string to the NBD client.
Doing this also makes it easier to test commit 200650d4, which
is the client counterpart of receiving the
Commit ab7c548e added a check for invalid flags, but used an
early return on error instead of properly going through the
cleanup label.
Signed-off-by: Eric Blake
---
v4: new patch
---
nbd/server.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
Rather than open-coding NBD_REP_SERVER, reuse the code we
already have by adding a length parameter. Additionally,
the refactoring will make adding NBD_OPT_GO in a later patch
easier.
Signed-off-by: Eric Blake
---
v4: no change
v3: rebase to changes earlier in series
---
Since we know that the maximum name we are willing to accept
is small enough to stack-allocate, rework the iteration over
NBD_OPT_LIST responses to reuse a stack buffer rather than
allocating every time. Furthermore, we don't even have to
allocate if we know the server's length doesn't match what
Current upstream NBD documents that requests have a 16-bit flags,
followed by a 16-bit type integer; although older versions mentioned
only a 32-bit field with masking to find flags. Since the protocol
is in network order (big-endian over the wire), the ABI is unchanged;
but dealing with the
The server has a nice helper function nbd_negotiate_drop_sync()
which lets it easily ignore fluff from the client (such as the
payload to an unknown option request). We can't quite make it
common, since it depends on nbd_negotiate_read() which handles
coroutine magic, but we can copy the idea
The upstream NBD protocol is proposing an extension for efficient
write zeroes; having a qemu implementation will be one of the reasons
to promote the proposal from experimental to standard:
https://github.com/yoe/nbd/blob/extension-write-zeroes/doc/proto.md
v4 was here:
This patch adds a basic dd subcommand analogous to dd(1) to qemu-img.
For the start, this implements the bs, if, of and count options and requires
both if and of to be specified (no stdin/stdout if not specified) and doesn't
support tty, pipes, etc.
The image format must be specified with -O for
From: Fam Zheng
AIO based handler is more appropriate here because it will then
cooperate with bdrv_drained_begin/end. It is needed by the coming
revert patch.
Signed-off-by: Fam Zheng
Reviewed-by: Michael S. Tsirkin
Signed-off-by: Michael S.
On Tue, 07/19 00:26, Vladimir Sementsov-Ogievskiy wrote:
> forget qemu-de...@nongnu.org.. add it.
>
> On 19.07.2016 00:22, Vladimir Sementsov-Ogievskiy wrote:
> > Hi all!
> >
> > This is a variant of existing test case which produces test failure.
> >
> > It looks like the reason is:
> >
> >
Upstream NBD protocol recently added the ability to efficiently
write zeroes without having to send the zeroes over the wire,
along with a flag to control whether the client wants a hole.
The generic block code takes care of falling back to the obvious
write of lots of zeroes if we return
On Mon, 07/18 22:07, Eric Blake wrote:
> Rather than open-coding each option request, it's easier to
> have common helper functions do the work. That in turn requires
> having convenient packed types for handling option requests
> and replies.
>
> Signed-off-by: Eric Blake
>
From: Fam Zheng
This reverts commit ab27c3b5e7408693dde0b565f050aa55c4a1bcef.
The virtio storage device host notifiers now work with
bdrv_drained_begin/end, so we don't need this hack any more.
Signed-off-by: Fam Zheng
Reviewed-by: Michael S. Tsirkin
On 18/07/2016 10:52, Peter Lieven wrote:
> +/* shrink to touch only completely contained clusters */
> +cl_num_shrinked = DIV_ROUND_UP(sector_num, iscsilun->cluster_sectors);
> +nb_cls_shrinked = (sector_num + nb_sectors) / iscsilun->cluster_sectors
> + -
until now the allocation map was used only as a hint if a cluster
is allocated or not. If a block was not allocated (or Qemu had
no info about the allocation status) a get_block_status call was
issued to check the allocation status and possibly avoid
a subsequent read of unallocated sectors. If a
when setting clusters as alloacted the boundaries have
to be expanded. As Paolo pointed out the calculation of
the number of clusters is wrong:
Suppose cluster_sectors is 2, sector_num = 1, nb_sectors = 6:
In the "mark allocated" case, you want to set 0..8, i.e.
cluster_num=0, nb_clusters=4.
until now the allocation map was used only as a hint if a cluster
is allocated or not. If a block was not allocated (or Qemu had
no info about the allocation status) a get_block_status call was
issued to check the allocation status and possibly avoid
a subsequent read of unallocated sectors. If a
On 15/07/2016 20:32, Eric Blake wrote:
> Now that the block layer honors max_request, we don't need to
> bother with an EINVAL on overlarge requests, but can instead
> assert that requests are well-behaved.
>
> Signed-off-by: Eric Blake
> Reviewed-by: Fam Zheng
On 15/07/2016 20:32, Eric Blake wrote:
> Now that the block layer will honor max_transfer, we can simplify
> our code to rely on that guarantee.
>
> The readv code can call directly into nbd-client, just as the
> writev code has done since commit 52a4650.
>
> Interestingly enough, while
On 15/07/2016 20:32, Eric Blake wrote:
> Now that NBD relies on the block layer to fragment things, we no
> longer need to track an offset argument for which fragment of
> a request we are actually servicing.
>
> While at it, use true and false instead of 0 and 1 for a bool
> parameter.
>
>
On 18/07/2016 09:55, Peter Lieven wrote:
> Am 16.07.2016 um 15:38 schrieb Paolo Bonzini:
>>
>> On 30/06/2016 13:07, Peter Lieven wrote:
>>> +static void
>>> +iscsi_allocmap_update(IscsiLun *iscsilun, int64_t sector_num,
>>> + int nb_sectors, bool allocated, bool valid)
>>>
On Fri, Jul 15, 2016 at 13:11:16 -0600, Eric Blake wrote:
> On 07/15/2016 07:49 AM, Daniel P. Berrange wrote:
> > On Fri, Jul 15, 2016 at 03:46:33PM +0200, Peter Krempa wrote:
> >> Libvirt didn't handle this for a long time and VMs with such config would
> >> not
> >> start we should implement
On Fri, 07/15 14:57, Max Reitz wrote:
> On 15.07.2016 11:44, Cao jin wrote:
> > Correct comments of field notify_me
> >
> > Cc: Kevin Wolf
> > Cc: Max Reitz
> > Signed-off-by: Cao jin
> > ---
> > include/block/aio.h | 2 +-
> > 1
This patch adds a basic dd subcommand analogous to dd(1) to qemu-img.
For the start, this implements the bs, if, of and count options and requires
both if and of to be specified (no stdin/stdout if not specified) and doesn't
support tty, pipes, etc.
The image format must be specified with -O for
On Mon, 07/18 12:00, Reda Sallahi wrote:
> This patch adds a basic dd subcommand analogous to dd(1) to qemu-img.
Please submit subsequent revisions as top level email. I.e. no In-Reply-To to
previous version.
>
> For the start, this implements the bs, if, of and count options and requires
>
77 matches
Mail list logo