[sheepdog] [PATCH 4/4] sheep: add test stub in http/swift

2013-11-24 Thread Robin Dong
Add uri /test_lock and /test_unlock for swift so users can test zk_mutex from web browser. Signed-off-by: Robin Dong san...@taobao.com --- sheep/http/swift.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/sheep/http/swift.c b/sheep/http/swift.c index

[sheepdog] [PATCH 3/4] sheep: add the distributed lock implemented by zookeeper for object-storage

2013-11-24 Thread Robin Dong
Implement the distributed lock by zookeeper (refer: http://zookeeper.apache.org/doc/trunk/recipes.html) The routine is: 1. create a seq-ephemeral znode in lock directory (use lock-id as dir name) 2. get smallest file path as owner of the lock; the other thread wait on a

[sheepdog] [PATCH 2/4] sheep: don't modify the option as it will be used in future

2013-11-24 Thread Robin Dong
The old zk_init() use strtok() and will set ',' to '\0' before 'timeout' argument, this will change the content of argument 'option' which we should not modify because it will be used by sheep/http.c Signed-off-by: Robin Dong san...@taobao.com --- sheep/cluster/zookeeper.c | 24

[sheepdog] [PATCH 1/4] sheep: fix typo in help information

2013-11-24 Thread Robin Dong
The help info for sheep -c zookeeper is zookeeperr which have a extra 'r'. Signed-off-by: Robin Dong san...@taobao.com --- sheep/sheep.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sheep/sheep.c b/sheep/sheep.c index 08b770e..9d9afa0 100644 --- a/sheep/sheep.c +++

Re: [sheepdog] [PATCH] add MAINTAINERS file

2013-11-24 Thread MORITA Kazutaka
At Sat, 23 Nov 2013 02:30:32 +0800, Liu Yuan wrote: We have stable branch concept and I guess a simply copy of get_maintainer.pl from other project won't work out. Might need much work to tailor the script to our needs. I'd like to leave it to a future patch. Okay, applied thanks.

Re: [sheepdog] [PATCH 1/4] sheep: fix typo in help information

2013-11-24 Thread Robin Dong
The present implementation of http/swift is not perfect, it can't create too much containers or objects. So we want to store all objects in one hyper volume vdi and use new structure 'obj-inode' to identify its offset and length in this vdi, just like some local file system. To achieve this, we