[sheepdog] [PATCH v4 8/8] sheepdev: add Makefile.in and modify configure.ac to adopt sheepdev

2013-01-22 Thread levin li
From: levin li Signed-off-by: levin li --- Makefile.am | 4 configure.ac | 9 + 2 files changed, 13 insertions(+) diff --git a/Makefile.am b/Makefile.am index 53d18b9..4db40bf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,10 @@ if BUILD_SHEEPFS SUBDIRS

[sheepdog] [PATCH v4 7/8] sheepdev: make it safe to open a snapshot VDI

2013-01-22 Thread levin li
From: levin li In case we open a snapshot VDI to make it as a block device, we immediately create a new writable VDI for this snapshot just as what QEMU does, then we can safely write to this VDI Signed-off-by: levin li --- sheepdev/sheep.c | 60

[sheepdog] [PATCH v4 6/8] sheepdev: create kernel threads to process the IO request in the driver

2013-01-22 Thread levin li
From: levin li This patch creates two kernel threads 'sheep_req' and 'sheep_fin' to process the IO requests and sheep response respectively, sheep_req just fetches IO request from the pending list, and forward the request to sheep, sheep_fin waits for sheep response, by which to end the IO reque

[sheepdog] [PATCH v4 5/8] sheepdev: make it possible to add or remove a sheep device

2013-01-22 Thread levin li
From: levin li This patch provides functions to create a sheep device by writing to the proc entry, but it hasn't processed the IO requests, it just ends the requests with -EIO. It creates sheep devices named /dev/sheepX, but until now, it can not handle IO request, any read/write request to thi

[sheepdog] [PATCH v4 4/8] sheepdev: add sheep.c to process the sheepdog protocol

2013-01-22 Thread levin li
From: levin li Signed-off-by: levin li --- sheepdev/Kbuild | 3 +- sheepdev/sheep.c| 186 sheepdev/sheepdev.h | 8 +++ 3 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 sheepdev/sheep.c diff --git a/sheepdev/

[sheepdog] [PATCH v4 3/8] sheepdev: add connect.c for network operations

2013-01-22 Thread levin li
From: levin li Signed-off-by: levin li --- sheepdev/Kbuild | 3 +- sheepdev/connect.c | 178 sheepdev/sheepdev.h | 7 +++ 3 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 sheepdev/connect.c diff --git a/sheepde

[sheepdog] [PATCH v4 2/8] sheepdev: use proc entry to control adding/removing devices

2013-01-22 Thread levin li
From: levin li Add a proc entry /proc/sheep for sheep device controlling, by writing to this entry to add or remove device For example: Add a sheep VDI as a block device: echo "add 127.0.0.1 linux:tag" > /proc/sheep Remove a sheep device: echo "del linux:tag" > /proc/sheep Signed-off-by: levi

[sheepdog] [PATCH v4 1/8] sheep: modify sheepdog_proto.h to make it usable in linux kernel module

2013-01-22 Thread levin li
From: levin li Signed-off-by: levin li --- include/sheepdog_proto.h | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h index 865f451..fb35f3a 100644 --- a/include/sheepdog_proto.h +++ b/include/sheepdog_proto.h @@

[sheepdog] [PATCH v4 0/8] sheepdev: linux kernel module of block device driver for sheepdog

2013-01-22 Thread levin li
From: levin li v3 -- > v4: 1. Refactor the code in proc.c and device.c 2. Split the big patch into some small patches 3. Fixed coding style to pass checkpatch.pl check v2 -- > v3: 1. Make it Ok for QEMU to run VDIs from the driver 2. Code refactor 3. Use the format 'del vdiname:snap_tag[snap_i

[sheepdog] Questions on the virtual disk's cache type

2013-01-22 Thread Liu Yuan
Hi List, I found from the nova/virt/libvirt/driver.py that we set disk cache mode always as 'none' for crash safety & migration correctness as commented. But for network volumes such as Sheepdog volume, which support client side cache, there is definitely use case for users that want to take fu

Re: [sheepdog] [PATCH v3 2/4] sheepdev: linux kernel module of block device driver for sheepdog

2013-01-22 Thread Liu Yuan
On 01/23/2013 10:42 AM, levin li wrote: > I didn't use strtok or strseq, so I don't quite understand what's your > meaning. What I meant is use string functions in the kernel (you can simply copy & paste) instead of manual parsing the string, which makes the code hard to maintain. Thanks, Yuan --

Re: [sheepdog] [PATCH v3 2/4] sheepdev: linux kernel module of block device driver for sheepdog

2013-01-22 Thread levin li
On 01/22/2013 01:20 PM, Liu Yuan wrote: On 01/22/2013 11:16 AM, levin li wrote: sheepdev/connect.c | 178 ++ sheepdev/device.c | 985 As a general rule, if the proper code of one functions exceed 60 lines, try hard to rethink th

Re: [sheepdog] [PATCH] util: rename set_trimmed_sectors as untrim_zero_sectors

2013-01-22 Thread Liu Yuan
On 01/22/2013 04:22 PM, Liu Yuan wrote: > From: Liu Yuan > > Signed-off-by: Liu Yuan Applied. Yuan -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog

Re: [sheepdog] [PATCH] object cache: fix reclaim_done()

2013-01-22 Thread Liu Yuan
On 01/22/2013 03:44 PM, Liu Yuan wrote: > free() struct reclaim_work instead of struct work. Applied. Yuan -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog

Re: [sheepdog] [PATCH v3] checkpatch.pl: forbid illegal empty lines after break;

2013-01-22 Thread MORITA Kazutaka
At Tue, 22 Jan 2013 18:05:16 +0900, Hitoshi Mitake wrote: > > From: Hitoshi Mitake > > This patch lets checkpatch.pl forbid illegal empty lines after break;. > > Forbidden empty lines are categorized into 2 types: > 1. empty lines after break; in a switch statement > 2. empty lines after last b

[sheepdog] [PATCH v3] checkpatch.pl: forbid illegal empty lines after break;

2013-01-22 Thread Hitoshi Mitake
From: Hitoshi Mitake This patch lets checkpatch.pl forbid illegal empty lines after break;. Forbidden empty lines are categorized into 2 types: 1. empty lines after break; in a switch statement 2. empty lines after last break; in a compound statement For example, a patch which contains diffs li

Re: [sheepdog] [PATCH v2] checkpatch.pl: forbid empty lines after break; line of switch statements

2013-01-22 Thread Hitoshi Mitake
At Mon, 21 Jan 2013 23:39:50 +0900, MORITA Kazutaka wrote: > > At Mon, 21 Jan 2013 11:47:40 +0900, > Hitoshi Mitake wrote: > > + > > +# forbid empty lines after break; line of switch statement > > +# e.g. > > +# +break; > > +# + > > +# +case XXX: > > + if ($line =~ /\bbreak;/

[sheepdog] [PATCH] util: rename set_trimmed_sectors as untrim_zero_sectors

2013-01-22 Thread Liu Yuan
From: Liu Yuan Signed-off-by: Liu Yuan --- collie/common.c |2 +- collie/vdi.c|4 ++-- include/util.h |2 +- lib/util.c |4 ++-- sheep/gateway.c |2 +- sheep/ops.c |2 +- sheep/store.c |2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --gi