Re: [Qemu-block] [Qemu-devel] [PATCH] block/iscsi: avoid potential overflow of acb->task->cdb

2016-05-30 Thread Fam Zheng
On Tue, 05/24 10:59, Peter Lieven wrote: > at least in the path via virtio-blk the maximum size is not > restricted. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Peter Lieven > --- > block/iscsi.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/block/iscsi.c b/block/iscsi.c >

Re: [Qemu-block] [PATCH v19 08/10] Implement new driver for block replication

2016-05-30 Thread Changlong Xie
On 05/31/2016 02:14 AM, Stefan Hajnoczi wrote: On Fri, May 20, 2016 at 03:36:18PM +0800, Changlong Xie wrote: +/* start backup job now */ +error_setg(&s->blocker, + "block device is in use by internal backup job"); + +top_bs = bdrv_lookup_bs(s->top_id, s

Re: [Qemu-block] [PATCH v19 00/10] Block replication for continuous checkpoints

2016-05-30 Thread Stefan Hajnoczi
On Fri, May 20, 2016 at 03:36:10PM +0800, Changlong Xie wrote: > Block replication is a very important feature which is used for > continuous checkpoints(for example: COLO). > > You can get the detailed information about block replication from here: > http://wiki.qemu.org/Features/BlockReplication

Re: [Qemu-block] [PATCH v19 08/10] Implement new driver for block replication

2016-05-30 Thread Stefan Hajnoczi
On Fri, May 20, 2016 at 03:36:18PM +0800, Changlong Xie wrote: > +/* start backup job now */ > +error_setg(&s->blocker, > + "block device is in use by internal backup job"); > + > +top_bs = bdrv_lookup_bs(s->top_id, s->top_id, errp); > +if (!top_bs

Re: [Qemu-block] [PATCH v19 09/10] tests: add unit test case for replication

2016-05-30 Thread Stefan Hajnoczi
On Fri, May 20, 2016 at 03:36:19PM +0800, Changlong Xie wrote: > +/* primary */ > +#define P_LOCAL_DISK "/tmp/p_local_disk.XX" > +#define P_COMMAND "driver=replication,mode=primary,node-name=xxx,"\ > + "file.driver=qcow2,file.file.filename="P_LOCAL_DISK > + > +/* secondary */ >

Re: [Qemu-block] Overflow in Virtio-BLK and SCSI Requests?

2016-05-30 Thread P J P
Hello Stefan, all +-- On Mon, 30 May 2016, Peter Lieven wrote --+ | Am 27.05.2016 um 23:22 schrieb Stefan Hajnoczi: | > On Fri, May 20, 2016 at 11:27:02AM +0200, Peter Lieven wrote: | > > while working at the iSCSI code in Qemu I came across the following line | > > in iscsi_aio_ioctl | > > | >

[Qemu-block] [PATCH] block: assert that bs->request_alignment is a power of 2

2016-05-30 Thread Peter Lieven
at least bdrv_co_preadv/pwritev expect this. Signed-off-by: Peter Lieven --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 736432f..f54bc25 100644 --- a/block.c +++ b/block.c @@ -1018,7 +1018,7 @@ static int bdrv_open_common(BlockDriverState

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/1] block: clarify error message for qmp-eject

2016-05-30 Thread Markus Armbruster
John Snow writes: > It already got applied, but I can change it to your preference. (Always > return an -errno and an Error, delete-and-free when we don't care about > it...) I think that would be an improvement. This is advice, not a demand :)

[Qemu-block] [PATCH] block/nfs: Implement .bdrv_co_preadv/pwritev interfaces

2016-05-30 Thread Peter Lieven
the libnfs read and write functions already take byte arguments so thats an easy change. Signed-off-by: Peter Lieven --- block/nfs.c | 40 +++- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 9f51cc3..386f846 100

[Qemu-block] [PATCH V3] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
in a read-modify-write cycle a small request might cause head and tail to fall into the same aligned block. Currently QEMU reads the same block twice in this case which is not necessary. Signed-off-by: Peter Lieven --- v1->v2: following Paolos suggestions to simplify the if condition and

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
Am 30.05.2016 um 12:06 schrieb Kevin Wolf: Am 30.05.2016 um 11:53 hat Peter Lieven geschrieben: Am 30.05.2016 um 11:47 schrieb Kevin Wolf: Am 30.05.2016 um 11:30 hat Peter Lieven geschrieben: Am 30.05.2016 um 10:24 schrieb Kevin Wolf: Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: Am 2

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Kevin Wolf
Am 30.05.2016 um 11:53 hat Peter Lieven geschrieben: > Am 30.05.2016 um 11:47 schrieb Kevin Wolf: > >Am 30.05.2016 um 11:30 hat Peter Lieven geschrieben: > >>Am 30.05.2016 um 10:24 schrieb Kevin Wolf: > >>>Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: > Am 27.05.2016 um 10:55 schrieb Kev

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
Am 30.05.2016 um 11:47 schrieb Kevin Wolf: Am 30.05.2016 um 11:30 hat Peter Lieven geschrieben: Am 30.05.2016 um 10:24 schrieb Kevin Wolf: Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: Am 27.05.2016 um 10:55 schrieb Kevin Wolf: Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben: On Thu,

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Peter Lieven
Am 30.05.2016 um 10:24 schrieb Kevin Wolf: Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: Am 27.05.2016 um 10:55 schrieb Kevin Wolf: Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben: On Thu, 05/26 11:20, Paolo Bonzini wrote: On 26/05/2016 10:30, Fam Zheng wrote: This doesn't look too w

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Kevin Wolf
Am 30.05.2016 um 11:30 hat Peter Lieven geschrieben: > Am 30.05.2016 um 10:24 schrieb Kevin Wolf: > >Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: > >>Am 27.05.2016 um 10:55 schrieb Kevin Wolf: > >>>Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben: > On Thu, 05/26 11:20, Paolo Bonzini wr

[Qemu-block] [PATCH 1/2] migration/block: Convert load to BlockBackend

2016-05-30 Thread Kevin Wolf
This converts the loading part of block migration to use BlockBackend interfaces rather than accessing the BlockDriverState directly. Note that this takes a lazy shortcut. We should really use a separate BlockBackend that is configured for the migration rather than for the guest (e.g. writethrough

[Qemu-block] [PATCH 2/2] migration/block: Convert saving to BlockBackend

2016-05-30 Thread Kevin Wolf
This creates a new BlockBackend for copying data from an images to the migration stream on the source host. All I/O for block migration goes through BlockBackend now. Signed-off-by: Kevin Wolf --- migration/block.c | 124 ++ 1 file changed, 79

[Qemu-block] [PATCH 0/2] Block migration: Convert to BlockBackend

2016-05-30 Thread Kevin Wolf
Users outside of the block layer shouldn't directly use BlockDriverState for issuing their I/O requests, but go through a BlockBackend to do so. Block migration ('migrate -b') is (one of?) the last remaining users that need to be converted. Kevin Wolf (2): migration/block: Convert load to BlockB

[Qemu-block] [PATCH] block/io: Remove unused bdrv_aio_write_zeroes()

2016-05-30 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c| 11 --- include/block/block.h | 3 --- trace-events | 1 - 3 files changed, 15 deletions(-) diff --git a/block/io.c b/block/io.c index 2d832aa..7ac9897 100644 --- a/block/io.c +++ b/block/io.c @@ -1865,17 +1865,6 @@ BlockAI

Re: [Qemu-block] [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-30 Thread Kevin Wolf
Am 30.05.2016 um 08:25 hat Peter Lieven geschrieben: > Am 27.05.2016 um 10:55 schrieb Kevin Wolf: > >Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben: > >>On Thu, 05/26 11:20, Paolo Bonzini wrote: > >>>On 26/05/2016 10:30, Fam Zheng wrote: > >>This doesn't look too wrong... Should the right se