[Qemu-block] [PATCH v7 00/10] Dirty bitmap changes for migration/persistence work

2016-07-18 Thread John Snow
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" ->

[Qemu-block] [PATCH v7 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH v7 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH v7 04/10] block: Support meta dirty bitmap

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH v7 05/10] block: Add two dirty bitmap getters

2016-07-18 Thread John Snow
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 ---

[Qemu-block] [PATCH v7 09/10] tests: Add test code for hbitmap serialization

2016-07-18 Thread 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

[Qemu-block] [PATCH v7 07/10] hbitmap: serialization

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH] backup: block-job error BUG

2016-07-18 Thread Vladimir Sementsov-Ogievskiy
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

Re: [Qemu-block] [PATCH] backup: block-job error BUG

2016-07-18 Thread Vladimir Sementsov-Ogievskiy
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

Re: [Qemu-block] [PATCH v4 07/11] block: Accept node-name for change-backing-file

2016-07-18 Thread Max Reitz
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 >>

Re: [Qemu-block] [PATCH v4 09/11] block: Accept node-name for drive-mirror

2016-07-18 Thread Max Reitz
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

Re: [Qemu-block] [PATCH v4 03/11] block: Accept node-name for blockdev-backup

2016-07-18 Thread Max Reitz
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

Re: [Qemu-block] [PATCH] virtio-blk: dataplane cleanup

2016-07-18 Thread Stefan Hajnoczi
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 >

Re: [Qemu-block] [PATCH v4] aio-posix: remove useless parameter

2016-07-18 Thread Stefan Hajnoczi
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

Re: [Qemu-block] [PATCH 1/1] block: improve error handling in raw_open

2016-07-18 Thread Max Reitz
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:

Re: [Qemu-block] [PATCH v6 04/10] block: Support meta dirty bitmap

2016-07-18 Thread Max Reitz
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

Re: [Qemu-block] [PATCH v2] mirror: double performance of the bulk stage if the disc is full

2016-07-18 Thread Denis V. Lunev
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.

Re: [Qemu-block] [PATCH v6 02/10] HBitmap: Introduce "meta" bitmap to track bit changes

2016-07-18 Thread Max Reitz
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 > --- >

Re: [Qemu-block] [PATCH v4 02/11] block: Accept node-name for block-commit

2016-07-18 Thread Eric Blake
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

Re: [Qemu-block] [PATCH v6 08/10] block: BdrvDirtyBitmap serialization interface

2016-07-18 Thread Max Reitz
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"

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: improve error handling in raw_open

2016-07-18 Thread Halil Pasic
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

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: improve error handling in raw_open

2016-07-18 Thread Max Reitz
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

Re: [Qemu-block] [PATCH v6 09/10] tests: Add test code for hbitmap serialization

2016-07-18 Thread Max Reitz
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 >

Re: [Qemu-block] [PATCH v4 02/11] block: Accept node-name for block-commit

2016-07-18 Thread Max Reitz
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

Re: [Qemu-block] [PATCH v3 0/8] drive-mirror improvements

2016-07-18 Thread Denis V. Lunev
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 -

Re: [Qemu-block] [PATCH v6 04/10] block: Support meta dirty bitmap

2016-07-18 Thread John Snow
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

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: improve error handling in raw_open

2016-07-18 Thread Halil Pasic
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

[Qemu-block] [PATCH v8 2/4] ide: set retry_unit for PIO and FLUSH requests

2016-07-18 Thread Denis V. Lunev
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

[Qemu-block] [PATCH v8 0/4] block: ignore flush requests when storage is clean

2016-07-18 Thread Denis V. Lunev
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

Re: [Qemu-block] [PATCH v4 17/32] blockdev: Separate bochs probe from its driver

2016-07-18 Thread Colin Lord
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, >>

Re: [Qemu-block] [Qemu-devel] [PATCH v7 4/4] block: ignore flush requests when storage is clean

2016-07-18 Thread John Snow
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

Re: [Qemu-block] [Qemu-devel] [PATCH v7 4/4] block: ignore flush requests when storage is clean

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH v8 1/4] ide: refactor retry_unit set and clear into separate function

2016-07-18 Thread Denis V. Lunev
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

Re: [Qemu-block] [Qemu-devel] [PATCH v6 09/10] tests: Add test code for hbitmap serialization

2016-07-18 Thread John Snow
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

Re: [Qemu-block] [Qemu-devel] [PATCH v7 4/4] block: ignore flush requests when storage is clean

2016-07-18 Thread Denis V. Lunev
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

[Qemu-block] [PATCH v8 4/4] block: ignore flush requests when storage is clean

2016-07-18 Thread Denis V. Lunev
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

[Qemu-block] [PATCH v8 3/4] tests: in IDE and AHCI tests perform DMA write before flushing

2016-07-18 Thread Denis V. Lunev
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

Re: [Qemu-block] [Qemu-devel] [PATCH v8 0/4] block: ignore flush requests when storage is clean

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH v7 02/10] HBitmap: Introduce "meta" bitmap to track bit changes

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH v7 03/10] tests: Add test code for meta bitmap

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH v7 10/10] block: More operations for meta dirty bitmap

2016-07-18 Thread John Snow
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.

[Qemu-block] [PATCH v7 08/10] block: BdrvDirtyBitmap serialization interface

2016-07-18 Thread John Snow
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

[Qemu-block] [PATCH v5 07/14] nbd: Share common option-sending code in client

2016-07-18 Thread Eric Blake
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 ---

Re: [Qemu-block] [Qemu-devel] [PATCH v5 05/14] nbd: Share common reply-sending code in server

2016-07-18 Thread Fam Zheng
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:

[Qemu-block] [PULL 46/55] virtio-blk: Wrap in vmstate

2016-07-18 Thread Michael S. Tsirkin
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

Re: [Qemu-block] [Qemu-devel] [PATCH v5 06/14] nbd: Send message along with server NBD_REP_ERR errors

2016-07-18 Thread Fam Zheng
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 >

Re: [Qemu-block] [PATCH v4 10/14] nbd: Less allocation during NBD_OPT_LIST

2016-07-18 Thread Eric Blake
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()

[Qemu-block] [PATCH v5 13/14] nbd: Implement NBD_CMD_WRITE_ZEROES on server

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH v5 12/14] nbd: Improve server handling of shutdown requests

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH v5 08/14] nbd: Let server know when client gives up negotiation

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH v5 03/14] nbd: Limit nbdflags to 16 bits

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH v5 06/14] nbd: Send message along with server NBD_REP_ERR errors

2016-07-18 Thread Eric Blake
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 |

[Qemu-block] [PATCH v5 02/14] nbd: Add qemu-nbd -D for human-readable description

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH v5 01/14] nbd: Fix bad flag detection on server

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH v5 05/14] nbd: Share common reply-sending code in server

2016-07-18 Thread Eric Blake
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 ---

[Qemu-block] [PATCH v5 10/14] nbd: Less allocation during NBD_OPT_LIST

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH v5 04/14] nbd: Treat flags vs. command type as separate fields

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH v5 09/14] nbd: Let client skip portions of server reply

2016-07-18 Thread Eric Blake
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

[Qemu-block] [PATCH for-2.7 v5 00/14] nbd: efficient write zeroes

2016-07-18 Thread Eric Blake
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:

[Qemu-block] [PATCH v3] qemu-img: add the 'dd' subcommand

2016-07-18 Thread Reda Sallahi
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

[Qemu-block] [PULL 38/55] virtio-blk: Call virtio_add_queue_aio

2016-07-18 Thread Michael S. Tsirkin
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.

Re: [Qemu-block] [Qemu-devel] [PATCH] backup: block-job error BUG

2016-07-18 Thread Fam Zheng
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: > > > >

[Qemu-block] [PATCH v5 14/14] nbd: Implement NBD_CMD_WRITE_ZEROES on client

2016-07-18 Thread Eric Blake
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

Re: [Qemu-block] [Qemu-devel] [PATCH v5 07/14] nbd: Share common option-sending code in client

2016-07-18 Thread Fam Zheng
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 >

[Qemu-block] [PULL 40/55] Revert "mirror: Workaround for unexpected iohandler events during completion"

2016-07-18 Thread Michael S. Tsirkin
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

Re: [Qemu-block] [PATCH V5 2/2] block/iscsi: allow caching of the allocation map

2016-07-18 Thread Paolo Bonzini
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 > + -

[Qemu-block] [PATCH V5 0/2] block/iscsi: allow caching of the allocation map

2016-07-18 Thread Peter Lieven
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

[Qemu-block] [PATCH V5 1/2] block/iscsi: fix rounding in iscsi_allocationmap_set

2016-07-18 Thread Peter Lieven
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.

[Qemu-block] [PATCH V5 2/2] block/iscsi: allow caching of the allocation map

2016-07-18 Thread Peter Lieven
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

Re: [Qemu-block] [PATCH v3 6/6] iscsi: Rely on block layer to break up large requests

2016-07-18 Thread Paolo Bonzini
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

Re: [Qemu-block] [PATCH v3 4/6] nbd: Rely on block layer to break up large requests

2016-07-18 Thread Paolo Bonzini
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

Re: [Qemu-block] [PATCH v3 5/6] nbd: Drop unused offset parameter

2016-07-18 Thread Paolo Bonzini
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. > >

Re: [Qemu-block] [PATCH V4] block/iscsi: allow caching of the allocation map

2016-07-18 Thread Paolo Bonzini
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) >>>

Re: [Qemu-block] [libvirt] [libvirt RFC PATCH 00/10] Add support for qemu's JSON pseudo'protocol for backing store

2016-07-18 Thread Peter Krempa
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

Re: [Qemu-block] [PATCH] AioContext: correct comments

2016-07-18 Thread Fam Zheng
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

[Qemu-block] [PATCH v2] qemu-img: add the 'dd' subcommand

2016-07-18 Thread Reda Sallahi
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

Re: [Qemu-block] [PATCH v2] qemu-img: add the 'dd' subcommand

2016-07-18 Thread Fam Zheng
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 >