[Qemu-devel] [PATCH 1/2] sheepdog: fix snapshot tag initialization

2013-06-06 Thread Liu Yuan
Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 21a4edf..94218ac 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2063,7 +2063,7 @@ static int sd_snapshot_goto

[Qemu-devel] [PATCH 0/2] fix 'qemu-img snapshot -a' operation for sheepdog

2013-06-06 Thread Liu Yuan
Nothing big, just two simple patches to enable this commind for sheepdog. Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Liu Yuan (2): sheepdog: fix snapshot tag initialization sheepdog

[Qemu-devel] [PATCH 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-06 Thread Liu Yuan
Just call sd_create_branch() to rollback the image is good enough Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |8

Re: [Qemu-devel] [PATCH 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-06 Thread Liu Yuan
On 06/06/2013 08:46 PM, Kevin Wolf wrote: Am 06.06.2013 um 13:57 hat Liu Yuan geschrieben: Just call sd_create_branch() to rollback the image is good enough Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa

Re: [Qemu-devel] [PATCH 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-06 Thread Liu Yuan
On 06/06/2013 08:46 PM, Kevin Wolf wrote: I'm not sure how snapshots work internally for Sheepdog, but it seems odd to me that you need to do this only for disk-only snapshots, but not when the snapshot has VM state. (Also, note that 'qemu-img snapshot -a' works on images with a VM state, so

Re: [Qemu-devel] [PATCH 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-07 Thread Liu Yuan
On 06/07/2013 03:31 PM, Kevin Wolf wrote: Am 06.06.2013 um 15:09 hat Liu Yuan geschrieben: On 06/06/2013 08:46 PM, Kevin Wolf wrote: Am 06.06.2013 um 13:57 hat Liu Yuan geschrieben: Just call sd_create_branch() to rollback the image is good enough Cc: qemu-devel@nongnu.org Cc: MORITA

[Qemu-devel] [PATCH v2 0/2] fix 'qemu-img snapshot -a' operation for sheepdog

2013-06-07 Thread Liu Yuan
morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Liu Yuan (2): sheepdog: fix snapshot tag initialization sheepdog: support 'qemu-img snapshot -a' block/sheepdog.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) -- 1.7.9.5

[Qemu-devel] [PATCH v2 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-07 Thread Liu Yuan
Just call sd_create_branch() to rollback the image is good enough Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 17

[Qemu-devel] [PATCH v2 1/2] sheepdog: fix snapshot tag initialization

2013-06-07 Thread Liu Yuan
Reviewed-by: Kevin Wolf kw...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 21a4edf..94218ac 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2063,7

Re: [Qemu-devel] [PATCH 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-07 Thread Liu Yuan
On 06/07/2013 11:22 PM, Kevin Wolf wrote: Am 07.06.2013 um 15:48 hat Liu Yuan geschrieben: On 06/07/2013 03:31 PM, Kevin Wolf wrote: Am 06.06.2013 um 15:09 hat Liu Yuan geschrieben: On 06/06/2013 08:46 PM, Kevin Wolf wrote: Am 06.06.2013 um 13:57 hat Liu Yuan geschrieben: Only when the write

[Qemu-devel] [PATCH v3 0/2] fix 'qemu-img snapshot -a' operation for sheepdog

2013-06-07 Thread Liu Yuan
to enable this commind for sheepdog. Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Liu Yuan (2): sheepdog: fix snapshot tag initialization sheepdog: support 'qemu-img snapshot -a' block

[Qemu-devel] [PATCH v3 1/2] sheepdog: fix snapshot tag initialization

2013-06-07 Thread Liu Yuan
Reviewed-by: Kevin Wolf kw...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 21a4edf..94218ac 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2063,7

[Qemu-devel] [PATCH v3 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-07 Thread Liu Yuan
) This will fix the possible bug that QEMU exit between 2 and 3 in the old code Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |9

Re: [Qemu-devel] [PATCH 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-07 Thread Liu Yuan
On 06/08/2013 12:48 AM, Kevin Wolf wrote: Hm, yes, I was confused. :-) Anyway, the options stay the same: Either C1 must somehow inherit the VM state from A on the Sheepdog level, or we must make sure to get this order: 1. Switch to (read-only) snapshot A 2. Load the VM state 3. Create

Re: [Qemu-devel] [PATCH v3 0/2] fix 'qemu-img snapshot -a' operation for sheepdog

2013-06-07 Thread Liu Yuan
On 06/08/2013 01:20 AM, Liu Yuan wrote: v3: - fix sheepdog's loadvm handling, don't rely on the write to create branch Oops, seems this version has problems. Please drop it. Thanks, Yuan

[Qemu-devel] [PATCH v4 0/2] fix 'qemu-img snapshot -a' operation for sheepdog

2013-06-07 Thread Liu Yuan
, it is not snapshot anymore. Nothing big, just two simple patches to enable this commind for sheepdog. Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Liu Yuan (2): sheepdog: fix snapshot tag

[Qemu-devel] [PATCH 1/2] sheepdog: fix snapshot tag initialization

2013-06-07 Thread Liu Yuan
Reviewed-by: Kevin Wolf kw...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 21a4edf..94218ac 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2063,7

[Qemu-devel] [PATCH v4 2/2] sheepdog: support 'qemu-img snapshot -a'

2013-06-07 Thread Liu Yuan
) This will fix the possible bug that QEMU exit between 2 and 3 in the old code Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 12

[Qemu-devel] [PATCH 2/2] sheepdog: pass copy_policy in the request

2013-10-16 Thread Liu Yuan
, passing it to sheep daemon is just one extra null effect operation. So no compatibility problem. With this patch, sheepdog can provide erasure coded volume for QEMU VM. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block

[Qemu-devel] [PATCH 1/2] sheepdog: explicitly set copies as type uint8_t

2013-10-16 Thread Liu Yuan
patch that allow passing copy_policy in request header. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/block/sheepdog.c b

[Qemu-devel] make use of copy_policy

2013-10-16 Thread Liu Yuan
This patch set makes use of copy_policy in struct SheepdogInode in order to support recently introduced erasure coding in sheepdog. Thanks Yuan

[Qemu-devel] [Sheepdog Announcement] erasure coding is fully functional, please try test

2013-10-18 Thread Liu Yuan
Hello all, Sheepdog is a distributed storage system that QEMU VM and RESTful services (in progress). Erasure coding is now seamlessly functional with all other features such as snapshot/clone/cluster-wide/multi-disk/auto-healing e.c with following characteristics: 1 Data is erasure coded

Re: [Qemu-devel] make use of copy_policy

2013-10-22 Thread Liu Yuan
On Wed, Oct 16, 2013 at 03:38:36PM +0800, Liu Yuan wrote: This patch set makes use of copy_policy in struct SheepdogInode in order to support recently introduced erasure coding in sheepdog. Thanks Yuan Ping ?

Re: [Qemu-devel] [PATCH] MAINTAINERS: add block driver sub-maintainers

2013-10-23 Thread Liu Yuan
...@lab.ntt.co.jp Is it okay to add Liu Yuan tailai...@taobao.com to the sheepdog maintainer too? He is a co-maintainer of the sheepdog project with me and very familiar with sheepdog internals. I'd like to appear to be 'Liu Yuan namei.u...@gmail.com' which is a long-term reachable mail address, if allowed

[Qemu-devel] [PATCH v2 0/2] sheepdog: make use of copy_policy

2013-10-23 Thread Liu Yuan
v2: - merge the reserved bits This patch set makes use of copy_policy in struct SheepdogInode in order to support recently introduced erasure coding volume in sheepdog. Thanks Yuan Liu Yuan (2): sheepdog: explicitly set copies as type uint8_t sheepdog: pass copy_policy in the request

[Qemu-devel] [PATCH v2 1/2] sheepdog: explicitly set copies as type uint8_t

2013-10-23 Thread Liu Yuan
patch that allow passing copy_policy in request header. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/block/sheepdog.c b

[Qemu-devel] [PATCH v2 2/2] sheepdog: pass copy_policy in the request

2013-10-23 Thread Liu Yuan
, passing it to sheep daemon is just one extra null effect operation. So no compatibility problem. With this patch, sheepdog can provide erasure coded volume for QEMU VM. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block

Re: [Qemu-devel] [PATCH v5 0/8] sheepdog: reconnect server after connection failure

2013-10-28 Thread Liu Yuan
servers crash unexpectedly. v5: - Use AioContext timer for co_aio_sleep_ns(). Tested-and-reviewed-by: Liu Yuan namei.u...@gmail.com Thanks Yuan

[Qemu-devel] [PATCH 0/2] sheepdog: add user-defined redundancy option

2013-10-29 Thread Liu Yuan
This patch set add one sheepdog specific option for qemu-img to control redundancy. This patch set is on top of Kevin's block tree. Liu Yuan (2): sheepdog: refactor do_sd_create() sheepdog: support user-defined redundancy option block/sheepdog.c | 110

[Qemu-devel] [PATCH 1/2] sheepdog: refactor do_sd_create()

2013-10-29 Thread Liu Yuan
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 37 +++-- 1 file changed, 15 insertions(+), 22

[Qemu-devel] [PATCH] sheepdog: support user-defined redundancy option

2013-10-29 Thread Liu Yuan
SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c

[Qemu-devel] [PATCH v2 2/2] sheepdog: refactor do_sd_create()

2013-10-29 Thread Liu Yuan
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 37 +++-- 1 file changed, 15 insertions(+), 22

[Qemu-devel] [PATCH v2 0/2] sheepdog: add user-defined redundancy option

2013-10-29 Thread Liu Yuan
v2: - fix a typo in comment and commit log This patch set add one sheepdog specific option for qemu-img to control redundancy. This patch set is on top of Kevin's block tree. Liu Yuan (2): sheepdog: pass copy_policy in the request sheepdog: refactor do_sd_create() block/sheepdog.c | 45

[Qemu-devel] [PATCH v2 1/2] sheepdog: pass copy_policy in the request

2013-10-29 Thread Liu Yuan
, passing it to sheep daemon is just one extra null effect operation. So no compatibility problem. With this patch, sheepdog can provide erasure coded volume for QEMU VM. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block

Re: [Qemu-devel] [PATCH v2 0/2] sheepdog: add user-defined redundancy option

2013-10-29 Thread Liu Yuan
On Tue, Oct 29, 2013 at 04:23:33PM +0800, Liu Yuan wrote: v2: - fix a typo in comment and commit log This patch set add one sheepdog specific option for qemu-img to control redundancy. This patch set is on top of Kevin's block tree. Oops, please ignore this patch set because I formated

[Qemu-devel] [PATCH v2 1/2] sheepdog: refactor do_sd_create()

2013-10-29 Thread Liu Yuan
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 37 +++-- 1 file changed, 15 insertions(+), 22

[Qemu-devel] [PATCH v2 2/2] sheepdog: support user-defined redundancy option

2013-10-29 Thread Liu Yuan
SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c

[Qemu-devel] [PATCH v2 0/2] sheepdog: add user-defined redundancy option

2013-10-29 Thread Liu Yuan
v2: - fix a typo in comment and commit log This patch set add one sheepdog specific option for qemu-img to control redundancy. This patch set is on top of Kevin's block tree. Liu Yuan (2): sheepdog: refactor do_sd_create() sheepdog: support user-defined redundancy option block

Re: [Qemu-devel] [sheepdog] [PATCH v2 2/2] sheepdog: support user-defined redundancy option

2013-10-30 Thread Liu Yuan
On Thu, Oct 31, 2013 at 04:41:05AM +0900, MORITA Kazutaka wrote: At Tue, 29 Oct 2013 16:25:52 +0800, Liu Yuan wrote: Sheepdog support two kinds of redundancy, full replication and erasure coding. # create a fully replicated vdi with x copies -o redundancy=x (1 = x = SD_MAX_COPIES

[Qemu-devel] [PATCH v3 0/2] sheepdog: add user-defined redundancy option

2013-10-30 Thread Liu Yuan
v3: - rework is_numeric v2: - fix a typo in comment and commit log This patch set add one sheepdog specific option for qemu-img to control redundancy. This patch set is on top of Kevin's block tree. Liu Yuan (2): sheepdog: refactor do_sd_create() sheepdog: support user-defined

[Qemu-devel] [PATCH v3 1/2] sheepdog: refactor do_sd_create()

2013-10-30 Thread Liu Yuan
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 37

[Qemu-devel] [PATCH v3 2/2] sheepdog: support user-defined redundancy option

2013-10-30 Thread Liu Yuan
SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net Signed-off-by: Liu Yuan

[Qemu-devel] [PATCH v4 0/2] sheepdog: add user-defined redundancy option

2013-10-30 Thread Liu Yuan
of Kevin's block tree. Liu Yuan (2): sheepdog: refactor do_sd_create() sheepdog: support user-defined redundancy option block/sheepdog.c | 127 + include/block/block_int.h |1 + 2 files changed, 105 insertions(+), 23 deletions(-) -- 1.7.9.5

[Qemu-devel] [PATCH v4 2/2] sheepdog: support user-defined redundancy option

2013-10-30 Thread Liu Yuan
SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net Signed-off-by: Liu Yuan

[Qemu-devel] [PATCH v4 1/2] sheepdog: refactor do_sd_create()

2013-10-30 Thread Liu Yuan
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 37

Re: [Qemu-devel] [PATCH v4 0/2] sheepdog: add user-defined redundancy option

2013-11-01 Thread Liu Yuan
On Thu, Oct 31, 2013 at 01:49:26PM +0800, Liu Yuan wrote: v4: - fix do_sd_create that forgot to pass nr_copies - fix parse_redundancy dealing with replicated vdi Hello Kevin, Could you pick these two patches to your block tree (so QEMU next release can enjoy the full erasure coding

[Qemu-devel] [PATCH v5 1/2] sheepdog: refactor do_sd_create()

2013-11-01 Thread Liu Yuan
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 37 +++-- 1 file changed, 15 insertions(+), 22

[Qemu-devel] [PATCH v5 2/2] sheepdog: support user-defined redundancy option

2013-11-01 Thread Liu Yuan
SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c

Re: [Qemu-devel] [PATCH v5 0/2] sheepdog: add user-defined redundancy option

2013-11-01 Thread Liu Yuan
On Fri, Nov 01, 2013 at 11:06:20PM +0800, Liu Yuan wrote: v5: - use pstrcpy instead of strncpy - fix a segfalt for 'null' string option string Oops, I sent the old patch set. Please ignore it I'll send a new v5. Thanks Yuan

[Qemu-devel] [PATCH v5 RESENT 0/2] sheepdog: add user-defined redundancy option

2013-11-01 Thread Liu Yuan
specific option for qemu-img to control redundancy. This patch set is on top of Kevin's block tree. Liu Yuan (2): sheepdog: refactor do_sd_create() sheepdog: support user-defined redundancy option block/sheepdog.c | 127 + include

[Qemu-devel] [PATCH v5 1/2] sheepdog: refactor do_sd_create()

2013-11-01 Thread Liu Yuan
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 37 +++-- 1 file changed, 15 insertions(+), 22

[Qemu-devel] [PATCH v5 2/2] sheepdog: support user-defined redundancy option

2013-11-01 Thread Liu Yuan
SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c

[Qemu-devel] [PATCH v5 0/2] sheepdog: add user-defined redundancy option

2013-11-01 Thread Liu Yuan
specific option for qemu-img to control redundancy. This patch set is on top of Kevin's block tree. Liu Yuan (2): sheepdog: refactor do_sd_create() sheepdog: support user-defined redundancy option block/sheepdog.c | 127 + include

Re: [Qemu-devel] [sheepdog] [PATCH v2 0/9] sheepdog: reconnect server after connection failure

2013-07-24 Thread Liu Yuan
On Wed, Jul 24, 2013 at 04:56:24PM +0900, MORITA Kazutaka wrote: Currently, if a sheepdog server exits, all the connecting VMs need to be restarted. This series implements a feature to reconnect the server, and enables us to do online sheepdog upgrade and avoid restarting VMs when sheepdog

Re: [Qemu-devel] [sheepdog] [PATCH v2 0/9] sheepdog: reconnect server after connection failure

2013-07-24 Thread Liu Yuan
On Wed, Jul 24, 2013 at 06:07:21PM +0900, MORITA Kazutaka wrote: At Wed, 24 Jul 2013 16:28:30 +0800, Liu Yuan wrote: On Wed, Jul 24, 2013 at 04:56:24PM +0900, MORITA Kazutaka wrote: Currently, if a sheepdog server exits, all the connecting VMs need to be restarted. This series

Re: [Qemu-devel] [sheepdog] [PATCH v2 0/9] sheepdog: reconnect server after connection failure

2013-07-24 Thread Liu Yuan
On Wed, Jul 24, 2013 at 11:42:49PM +0800, Liu Yuan wrote: On Wed, Jul 24, 2013 at 06:07:21PM +0900, MORITA Kazutaka wrote: At Wed, 24 Jul 2013 16:28:30 +0800, Liu Yuan wrote: On Wed, Jul 24, 2013 at 04:56:24PM +0900, MORITA Kazutaka wrote: Currently, if a sheepdog server exits, all

[Qemu-devel] [PATCH 1/2] sheepdog: correct signedness of comparison

2013-07-24 Thread Liu Yuan
When signed int compared to unsigned int, signed int will be converted to unsigned int. For example, (-1 sizeof(structure)) always true because -1 in the left is converted into unsigned int, thus this restule in unexpected true. Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c

Re: [Qemu-devel] [PATCH v2 0/9] sheepdog: reconnect server after connection failure

2013-07-24 Thread Liu Yuan
Hello Kazutaka, I have two patches fixing the problems I found on my testing and they are complementary patches. Please consider sending them on top of your patch set. Thanks Yuan

[Qemu-devel] [PATCH 2/2] sheepdog: put aio request into failed list when failing to send request

2013-07-24 Thread Liu Yuan
qemu_co_send() in the add_aio_request might fail if connection is closed. In this case we should it requests into failed list to be resended later when connection is repaired. Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |8 ++-- 1 file changed, 6 insertions(+), 2

Re: [Qemu-devel] [sheepdog] [PATCH v2 0/9] sheepdog: reconnect server after connection failure

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 02:53:57PM +0900, MORITA Kazutaka wrote: At Thu, 25 Jul 2013 13:25:33 +0800, Liu Yuan wrote: Hello Kazutaka, I have two patches fixing the problems I found on my testing and they are complementary patches. Please consider sending them on top of your patch

Re: [Qemu-devel] [PATCH v3 03/10] sheepdog: check return values of qemu_co_recv/send correctly

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 05:31:58PM +0900, MORITA Kazutaka wrote: If qemu_co_recv/send doesn't return the specified length, it means that an error happened. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp --- block/sheepdog.c | 16 1 file changed, 8

Re: [Qemu-devel] [PATCH v3 03/10] sheepdog: check return values of qemu_co_recv/send correctly

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 04:46:36PM +0800, Liu Yuan wrote: On Thu, Jul 25, 2013 at 05:31:58PM +0900, MORITA Kazutaka wrote: If qemu_co_recv/send doesn't return the specified length, it means that an error happened. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp

Re: [Qemu-devel] [PATCH v3 09/10] sheepdog: cancel aio requests if possible

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 05:32:04PM +0900, MORITA Kazutaka wrote: This patch tries to cancel aio requests in pending queue and failed queue. When the sheepdog driver cannot cancel the requests, it waits for them to be completed. Signed-off-by: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp

Re: [Qemu-devel] [PATCH v3 07/10] sheepdog: try to reconnect to sheepdog after network error

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 05:32:02PM +0900, MORITA Kazutaka wrote: This introduces a failed request queue and links all the inflight requests to the list after network error happens. After QEMU reconnects to the sheepdog server successfully, the sheepdog block driver will retry all the requests

Re: [Qemu-devel] [sheepdog] [PATCH v3 07/10] sheepdog: try to reconnect to sheepdog after network error

2013-07-25 Thread Liu Yuan
On Thu, Jul 25, 2013 at 09:53:14PM +0900, MORITA Kazutaka wrote: At Thu, 25 Jul 2013 17:13:46 +0800, Liu Yuan wrote: + +/* Try to reconnect the sheepdog server every one second. */ +while (s-fd 0) { +s-fd = get_sheep_fd(s); +if (s-fd 0

[Qemu-devel] [PATCH] sheepdog: add missing .bdrv_has_zero_init

2013-08-06 Thread Liu Yuan
Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/sheepdog.c b/block/sheepdog.c index 46821df..eeb5617 100644 --- a/block/sheepdog.c +++ b/block

Re: [Qemu-devel] [PATCH] sheepdog: add missing .bdrv_has_zero_init

2013-08-06 Thread Liu Yuan
On Tue, Aug 06, 2013 at 02:44:37PM +0800, Liu Yuan wrote: Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/sheepdog.c b/block/sheepdog.c

Re: [Qemu-devel] [sheepdog] [PATCH] sheepdog: add missing .bdrv_has_zero_init

2013-08-06 Thread Liu Yuan
On Tue, Aug 06, 2013 at 10:24:42AM +0200, Kevin Wolf wrote: Am 06.08.2013 um 09:37 hat MORITA Kazutaka geschrieben: At Tue, 6 Aug 2013 14:44:37 +0800, Liu Yuan wrote: Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u

[Qemu-devel] [PATCH] sheepdog: implement .bdrv_get_allocated_file_size

2013-08-07 Thread Liu Yuan
With this patch, qemu-img info sheepdog:image will show disk size for sheepdog images. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 19

[Qemu-devel] [PATCH v6 1/2] sheepdog: refactor do_sd_create()

2013-11-07 Thread Liu Yuan
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c | 37 +++-- 1 file changed, 15 insertions(+), 22

[Qemu-devel] [PATCH v6 RESENT 0/2] sheepdog: add user-defined redundancy option

2013-11-07 Thread Liu Yuan
in comment and commit log This patch set add one sheepdog specific option for qemu-img to control redundancy. This patch set is on top of Kevin's block tree. Liu Yuan (2): sheepdog: refactor do_sd_create() sheepdog: support user-defined redundancy option block/sheepdog.c | 127

[Qemu-devel] [PATCH v6 2/2] sheepdog: support user-defined redundancy option

2013-11-07 Thread Liu Yuan
SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c

Re: [Qemu-devel] [PATCH v5 2/2] sheepdog: support user-defined redundancy option

2013-11-07 Thread Liu Yuan
On Wed, Nov 06, 2013 at 10:34:24AM +0100, Stefan Hajnoczi wrote: On Tue, Nov 05, 2013 at 08:46:07AM -0700, Eric Blake wrote: On 11/05/2013 07:37 AM, Stefan Hajnoczi wrote: + +copy = strtol(n1, NULL, 10); +if (copy SD_MAX_COPIES) { +return -EINVAL; +}

Re: [Qemu-devel] [PATCH v6 RESENT 0/2] sheepdog: add user-defined redundancy option

2013-11-17 Thread Liu Yuan
On Thu, Nov 07, 2013 at 10:56:36PM +0800, Liu Yuan wrote: v6: - update comment typo - remove is_number() Anyone pick this set up? Thanks Yuan

[Qemu-devel] [PATCH] MAINTAINERS: add sheepdog development mailing list

2013-11-19 Thread Liu Yuan
This will help people find mailing list relevant to sheepdog. Stefan Hajnoczi stefa...@redhat.com Kevin Wolf kw...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c19133f..3e61ac8

[Qemu-devel] [PATCH] MAINTAINERS: add sheepdog development mailing list

2013-11-19 Thread Liu Yuan
This will help people find mailing list relevant to sheepdog. Cc: Stefan Hajnoczi stefa...@redhat.com Cc: Kevin Wolf kw...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c19133f

Re: [Qemu-devel] [PATCH v6 RESENT 0/2] sheepdog: add user-defined redundancy option

2013-11-20 Thread Liu Yuan
On Mon, Nov 18, 2013 at 01:58:50PM +0800, Liu Yuan wrote: On Thu, Nov 07, 2013 at 10:56:36PM +0800, Liu Yuan wrote: v6: - update comment typo - remove is_number() Anyone pick this set up? Ping again. Without this two patches, qemu-img can't create|convert erasure coded images

Re: [Qemu-devel] [PATCH v6 RESENT 0/2] sheepdog: add user-defined redundancy option

2013-11-21 Thread Liu Yuan
On Thu, Nov 21, 2013 at 09:23:59AM +0100, Stefan Hajnoczi wrote: On Thu, Nov 21, 2013 at 01:22:53AM +0800, Liu Yuan wrote: On Mon, Nov 18, 2013 at 01:58:50PM +0800, Liu Yuan wrote: On Thu, Nov 07, 2013 at 10:56:36PM +0800, Liu Yuan wrote: v6: - update comment typo - remove

Re: [Qemu-devel] Adding a persistent writeback cache to qemu

2013-06-21 Thread Liu Yuan
On 06/20/2013 11:58 PM, Sage Weil wrote: On Thu, 20 Jun 2013, Stefan Hajnoczi wrote: The concrete problem here is that flashcache/dm-cache/bcache don't work with the rbd (librbd) driver, as flashcache/dm-cache/bcache cache access to block devices (in the host layer), and with rbd (for

[Qemu-devel] [PATCH] sheepdog: check if '-o redundancy' is passed from user

2013-12-08 Thread Liu Yuan
This fix a segfault (that is caused by b3af018f3) of following command: $ qemu-img convert some_img sheepdog:some_img Cc: qemu-devel@nongnu.org Cc: Kevin Wolf kw...@redhat.com Cc: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |8

[Qemu-devel] [PATCH] sheepdog: fix dynamic grow for running qcow2 format

2013-12-13 Thread Liu Yuan
Cc: Stefan Hajnoczi stefa...@redhat.com Reported-by: Hadrien KOHL hadrien.k...@gmail.com Signed-off-by: Liu Yuan namei.u...@gmail.com --- block/sheepdog.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index d1c812d..ba451a9 100644

[Qemu-devel] [PATCH] sheepdog: implement SD_OP_FLUSH_VDI operation

2012-04-02 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Flush operation is supposed to flush the write-back cache of sheepdog cluster. By issuing flush operation, we can assure the Guest of data reaching the sheepdog cluster storage. Cc: Kevin Wolf kw...@redhat.com Reviewd-by: MORITA Kazutaka morita.kazut

Re: [Qemu-devel] [PATCH] sheepdog: implement SD_OP_FLUSH_VDI operation

2012-04-02 Thread Liu Yuan
On 04/03/2012 04:01 AM, Michael Tokarev wrote: On 02.04.2012 21:35, Liu Yuan wrote: From: Liu Yuan tailai...@taobao.com Flush operation is supposed to flush the write-back cache of sheepdog cluster. By issuing flush operation, we can assure the Guest of data reaching the sheepdog cluster

[Qemu-devel] [PATCH v2] sheepdog: implement SD_OP_FLUSH_VDI operation

2012-04-02 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Flush operation is supposed to flush the write-back cache of sheepdog cluster. By issuing flush operation, we can assure the Guest of data reaching the sheepdog cluster storage. Cc: Kevin Wolf kw...@redhat.com Cc: Michael Tokarev m...@tls.msk.ru Cc: MORITA

[Qemu-devel] [PATCH v3] sheepdog: implement SD_OP_FLUSH_VDI operation

2012-04-03 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Flush operation is supposed to flush the write-back cache of sheepdog cluster. By issuing flush operation, we can assure the Guest of data reaching the sheepdog cluster storage. Cc: Kevin Wolf kw...@redhat.com Cc: Michael Tokarev m...@tls.msk.ru Cc: MORITA

[Qemu-devel] [PATCH v4] sheepdog: implement SD_OP_FLUSH_VDI operation

2012-04-03 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Flush operation is supposed to flush the write-back cache of sheepdog cluster. By issuing flush operation, we can assure the Guest of data reaching the sheepdog cluster storage. Cc: Kevin Wolf kw...@redhat.com Cc: Michael Tokarev m...@tls.msk.ru Cc: MORITA

[Qemu-devel] RE. [PATCH] sheepdog: fix send req helpers

2012-04-03 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Yes, I think so. Here is the patch. Subject: [PATCH] sheepdog: fix send req helpers From: Liu Yuan tailai...@taobao.com We should return if reading of the header fails. Cc: Kevin Wolf kw...@redhat.com Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp Signed

[Qemu-devel] [PATCH v4 UPDATE] sheepdog: implement SD_OP_FLUSH_VDI operation

2012-04-03 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Flush operation is supposed to flush the write-back cache of sheepdog cluster. By issuing flush operation, we can assure the Guest of data reaching the sheepdog cluster storage. Cc: Kevin Wolf kw...@redhat.com Cc: Michael Tokarev m...@tls.msk.ru Cc: MORITA

[Qemu-devel] [PATCH v5] sheepdog: implement SD_OP_FLUSH_VDI operation

2012-04-03 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com Flush operation is supposed to flush the write-back cache of sheepdog cluster. By issuing flush operation, we can assure the Guest of data reaching the sheepdog cluster storage. Cc: Kevin Wolf kw...@redhat.com Cc: MORITA Kazutaka morita.kazut...@lab.ntt.co.jp

Re: [Qemu-devel] [PATCH v5] sheepdog: implement SD_OP_FLUSH_VDI operation

2012-04-04 Thread Liu Yuan
Hi kevin, On 04/04/2012 04:53 PM, Kevin Wolf wrote: I can update it in my queue, no problem there. But I diffed this against v4 and it doesn't seem to have any changes, except in the context of two hunks. Are you sure that you didn't do the fixes in a separate commit or send the wrong

[Qemu-devel] [Bug] Segmentation fault with QEMU v1.1.0 running Sheepdog block driver

2012-06-03 Thread Liu Yuan
Hi list, This segfault is met when installing RHEL 6 with Sheepdog cluster. Program terminated with signal 11, Segmentation fault. #0 0x7f777fc30359 in send_pending_req (s=0x7f77818a2160, oid=71271095331718270, id=1858) at block/sheepdog.c:629 629 QLIST_FOREACH_SAFE(aio_req,

[Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-10 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com The 'qemu-img convert -h' advertise that the default cache mode is 'writeback', while in fact it is 'unsafe'. This patch 1) changes the cache mode as 'writeback' and 2) explicitly calls bdrv_flush() to flush the dirty bits. 2) is needed because some backend

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-10 Thread Liu Yuan
Hi Paolo, On 04/11/2012 03:40 AM, Paolo Bonzini wrote: From: Liu Yuan tailai...@taobao.com The 'qemu-img convert -h' advertise that the default cache mode is 'writeback', while in fact it is 'unsafe'. This patch 1) changes the cache mode as 'writeback' and 2) explicitly calls

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Liu Yuan
On 04/11/2012 03:32 PM, Paolo Bonzini wrote: Il 11/04/2012 04:42, Liu Yuan ha scritto: 1) if we use bdrv_close(), we rely on the assumption that backend storage will do flushing while interpreting this operation. This assumption might not always hold, for e.g, current sheepdog doesn't do

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Liu Yuan
On 04/11/2012 03:49 PM, Kevin Wolf wrote: I don't agree with this patch. If the documentation says that qemu-img always uses writeback, then the documentation must be fixed. We really don't care about flushes during an image conversion. It should just go as fast as it can. If any error

Re: [Qemu-devel] [PATCH] qemu-img: let qemu-img behave as the manual advertise

2012-04-11 Thread Liu Yuan
On 04/11/2012 08:27 PM, Kevin Wolf wrote: Am 11.04.2012 12:33, schrieb Kevin Wolf: Am 11.04.2012 12:05, schrieb Liu Yuan: On 04/11/2012 03:49 PM, Kevin Wolf wrote: I don't agree with this patch. If the documentation says that qemu-img always uses writeback, then the documentation must

[Qemu-devel] [PATCH v2] qemu-img: let 'qemu-img convert' flush data

2012-04-11 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com The 'qemu-img convert -h' advertise that the default cache mode is 'writeback', while in fact it is 'unsafe'. This patch 1) fix the help manual and 2) let bdrv_close() call bdrv_flush() 3) explicitly calls bdrv_close() to flush the dirty bits. 3) is needed

Re: [Qemu-devel] [PATCH v2] qemu-img: let 'qemu-img convert' flush data

2012-04-11 Thread Liu Yuan
On 04/11/2012 11:01 PM, Paolo Bonzini wrote: bdrv_delete already does this. Paolo Ah yes. Thanks pointing out. From 459414f677f6449482f9cfcb7917ff0e242ad490 Mon Sep 17 00:00:00 2001 From: Liu Yuan tailai...@taobao.com Date: Wed, 11 Apr 2012 23:19:54 +0800 Subject: [PATCH v3] qemu-img: let

Re: [Qemu-devel] [PATCH v2] qemu-img: let 'qemu-img convert' flush data

2012-04-12 Thread Liu Yuan
On 04/11/2012 11:21 PM, Liu Yuan wrote: On 04/11/2012 11:01 PM, Paolo Bonzini wrote: bdrv_delete already does this. Paolo Ah yes. Thanks pointing out. Hi Kevin, If no further comment, would you pick up following patch? Yuan From 459414f677f6449482f9cfcb7917ff0e242ad490 Mon

[Qemu-devel] [PATCH v3] qemu-img: let 'qemu-img convert' flush data

2012-04-13 Thread Liu Yuan
From: Liu Yuan tailai...@taobao.com The 'qemu-img convert -h' advertise that the default cache mode is 'writeback', while in fact it is 'unsafe'. This patch 1) fix the help manual and 2) let bdrv_close() call bdrv_flush() 2) is needed because some backend storage doesn't have a self-flush

  1   2   3   4   >