Re: [Qemu-block] [PATCH RFC v2 4/6] replication: fix code logic with the new shared_disk option

2017-01-17 Thread Hailiang Zhang
On 2016/12/20 20:42, Changlong Xie wrote: On 12/05/2016 04:35 PM, zhanghailiang wrote: Some code logic only be needed in non-shared disk, here we adjust these codes to prepare for shared disk scenario. Signed-off-by: zhanghailiang --- block/replication.c |

Re: [Qemu-block] [PATCH RFC v2 2/6] replication: add shared-disk and shared-disk-id options

2017-01-17 Thread Hailiang Zhang
On 2017/1/17 19:25, Stefan Hajnoczi wrote: On Mon, Dec 05, 2016 at 04:35:00PM +0800, zhanghailiang wrote: @@ -85,6 +99,9 @@ static int replication_open(BlockDriverState *bs, QDict *options, QemuOpts *opts = NULL; const char *mode; const char *top_id; +const char

Re: [Qemu-block] [PATCH RFC v2 5/6] replication: Implement block replication for shared disk case

2017-01-17 Thread Hailiang Zhang
Hi Stefan, On 2017/1/17 21:19, Stefan Hajnoczi wrote: On Mon, Dec 05, 2016 at 04:35:03PM +0800, zhanghailiang wrote: @@ -663,8 +695,12 @@ static void replication_stop(ReplicationState *rs, bool failover, Error **errp) switch (s->mode) { case REPLICATION_MODE_PRIMARY: -

Re: [Qemu-block] [Qemu-devel] [PATCH RFC v2 2/6] replication: add shared-disk and shared-disk-id options

2017-01-17 Thread Hailiang Zhang
On 2016/12/6 0:22, Eric Blake wrote: On 12/05/2016 02:35 AM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen

Re: [Qemu-block] [PATCH v6 0/2] allow blockdev-add for NFS

2017-01-17 Thread Peter Lieven
Am 31.10.2016 um 18:20 schrieb Kevin Wolf: Am 31.10.2016 um 16:05 hat Ashijeet Acharya geschrieben: Previously posted series patches: v5: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg07580.html v4: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg07449.html v3:

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] block: get max_transfer limit for char (scsi-generic) devices

2017-01-17 Thread Eric Farman
On 01/17/2017 02:04 AM, Fam Zheng wrote: On Mon, 01/16 22:12, Eric Farman wrote: Commit 6f607174 introduced a routine to get the maximum number of bytes for a single I/O transfer for block devices, however scsi generic devices are character devices, not block. Add a condition for this, with

Re: [Qemu-block] [PATCH RFC v2 2/6] replication: add shared-disk and shared-disk-id options

2017-01-17 Thread Stefan Hajnoczi
On Mon, Dec 05, 2016 at 04:35:00PM +0800, zhanghailiang wrote: > @@ -85,6 +99,9 @@ static int replication_open(BlockDriverState *bs, QDict > *options, > QemuOpts *opts = NULL; > const char *mode; > const char *top_id; > +const char *shared_disk_id; > +BlockBackend *blk; > +

Re: [Qemu-block] [Qemu-stable] [PATCH] block/iscsi: avoid data corruption with cache=writeback

2017-01-17 Thread Peter Lieven
Am 17.01.2017 um 12:28 schrieb Fam Zheng: On Mon, 01/16 16:17, Peter Lieven wrote: nb_cls_shrunk in iscsi_allocmap_update can become -1 if the request starts and ends within the same cluster. This results in passing -1 to bitmap_set and bitmap_clear and they don't handle negative values

Re: [Qemu-block] [PATCH RFC v2 3/6] replication: Split out backup_do_checkpoint() from secondary_do_checkpoint()

2017-01-17 Thread Stefan Hajnoczi
On Mon, Dec 05, 2016 at 04:35:01PM +0800, zhanghailiang wrote: > The helper backup_do_checkpoint() will be used for primary related > codes. Here we split it out from secondary_do_checkpoint(). > > Besides, it is unnecessary to call backup_do_checkpoint() in > replication starting and normally

Re: [Qemu-block] [PATCH RFC v2 4/6] replication: fix code logic with the new shared_disk option

2017-01-17 Thread Stefan Hajnoczi
On Mon, Dec 05, 2016 at 04:35:02PM +0800, zhanghailiang wrote: > Some code logic only be needed in non-shared disk, here > we adjust these codes to prepare for shared disk scenario. > > Signed-off-by: zhanghailiang > --- > block/replication.c | 47

Re: [Qemu-block] [PATCH RFC v2 5/6] replication: Implement block replication for shared disk case

2017-01-17 Thread Stefan Hajnoczi
On Mon, Dec 05, 2016 at 04:35:03PM +0800, zhanghailiang wrote: > @@ -663,8 +695,12 @@ static void replication_stop(ReplicationState *rs, bool > failover, Error **errp) > > switch (s->mode) { > case REPLICATION_MODE_PRIMARY: > -s->replication_state = BLOCK_REPLICATION_DONE; > -

Re: [Qemu-block] [PATCH v1 07/15] iotests: fix 097 when run with qcow

2017-01-17 Thread Daniel P. Berrange
On Mon, Jan 16, 2017 at 09:04:31PM +0100, Max Reitz wrote: > On 03.01.2017 19:27, Daniel P. Berrange wrote: > > The previous commit: > > > > commit a3e1505daec31ef56f0489f8c8fff1b8e4ca92bd > > Author: Eric Blake > > Date: Mon Dec 5 09:49:34 2016 -0600 > > > >

Re: [Qemu-block] [Qemu-stable] [PATCH] block/iscsi: avoid data corruption with cache=writeback

2017-01-17 Thread Fam Zheng
On Mon, 01/16 16:17, Peter Lieven wrote: > nb_cls_shrunk in iscsi_allocmap_update can become -1 if the > request starts and ends within the same cluster. This results > in passing -1 to bitmap_set and bitmap_clear and they don't > handle negative values properly. In the end this leads to data >