[sheepdog] Sheepdog initialize issue

2014-10-28 Thread Jinzhi Chen
hi, I'm current using sheepdog v0.8.3, with journal enable When configure with --enable-debug and start sheep with journal , one of sheep's thread [journal commit] goes into infinite loop in function `trace_set_tid_map` lib/work.c static void trace_set_tid_map(int tid) { sd_mutex_lock(&tid

[sheepdog] `tid_max` in lib/work.c need to be initialized

2014-10-28 Thread Jinzhi Chen
hi, I'm currently using sheepodg v0.8.3, configure with --enable-debug & start sheep with journal directory. during `journal_file_init` progress, journal thread is created. but the `tid_max` is not initialized until `wq_trace_init` is called, which is called just after journal init progress. Thu

Re: [sheepdog] `tid_max` in lib/work.c need to be initialized

2014-10-28 Thread Jinzhi Chen
sorry, i'thinks `tid_max` should be set to 1, On Tue, Oct 28, 2014 at 5:29 PM, Jinzhi Chen wrote: > hi, > > I'm currently using sheepodg v0.8.3, configure with --enable-debug & start > sheep with journal directory. > > > during `journal_file_init` progress, j

[sheepdog] [PATCH] lib/work: initialize `tid_max` to 1

2014-10-28 Thread Jinzhi Chen
journal thread uses `tid_max` which is not initialized until later initial progress. The default value 0 cause journal thread loop in the function `trace_set_tid_map` , so set default value to 1. Signed-off-by: jinzhichen --- lib/work.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [sheepdog] [PATCH] lib/work: initialize `tid_max` to 1

2014-10-29 Thread Jinzhi Chen
this manner, we don't need a new function. Thanks Jinzhi Chen On Thu, Oct 30, 2014 at 9:42 AM, Hitoshi Mitake < mitake.hito...@lab.ntt.co.jp> wrote: > > Hi Jinzhi, thanks for your patch. > > At Wed, 29 Oct 2014 13:53:14 +0800, > Jinzhi Chen wrote: > > > >

Re: [sheepdog] [PATCH] lib/work: initialize `tid_max` to 1

2014-10-30 Thread Jinzhi Chen
nal init */ + ret = wq_trace_init (); + if (ret) { + sd_err("failed to init trace"); + goto cleanup_log; + } + /* We should init journal file before backend init */ if (uatomic_is_true(&sys->use_journal)) { if (!strlen(jpath)) -- 1.7.9.5 On Thu, Oct 30, 2014 at 4:14 PM, Hito

Re: [sheepdog] [PATCH] corosync: fix a compiler warning

2014-10-30 Thread Jinzhi Chen
this problem still exits in the master branch, seems not merged into master or devel branch On Tue, Oct 14, 2014 at 4:13 PM, Liu Yuan wrote: > Fix following warning: > > ... > cluster/corosync.c: In function ‘corosync_get_local_addr’: > cluster/corosync.c:132:22: warning: declaration of ‘sin’ sh

Re: [sheepdog] [PATCH] lib/work: initialize `tid_max` to 1

2014-10-30 Thread Jinzhi Chen
sorry, above patch is wrong. I'll resend it later. On Fri, Oct 31, 2014 at 10:12 AM, Jinzhi Chen wrote: > [PATCH] Initialize trace before journal init > > when journal thread init before the initialization of trace, > it enter into loop (using uninitailized `tid_max`)with

[sheepdog] [PATCH] init trace for work queue before journal init

2014-10-30 Thread Jinzhi Chen
before the initialization of journal file. Signed-off-by: Jinzhi Chen --- include/work.h |1 + lib/work.c | 49 +++-- sheep/sheep.c |7 +++ 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/include/work.h b/include

[sheepdog] [PATCH v2] init trace for work queue before journal init

2014-10-30 Thread Jinzhi Chen
`init_work_queue` and call it in the main() function just before the initialization of journal file. Signed-off-by: Jinzhi Chen --- include/work.h |1 + lib/work.c |8 ++-- sheep/sheep.c |7 +++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/work.h b

Re: [sheepdog] [PATCH] corosync: fix a compiler warning

2014-11-02 Thread Jinzhi Chen
BIND-8.2.3-T5B libc ABIs: UNIQUE IFUNC For bug reporting instructions, please see: <http://www.debian.org/Bugs/>. root@hty-compute2:~# On Fri, Oct 31, 2014 at 4:00 PM, Hitoshi Mitake < mitake.hito...@lab.ntt.co.jp> wrote: > At Fri, 31 Oct 2014 10:28:34 +0800, > Jinzhi Chen

[sheepdog] [PATCH] init trace for work queue before journal init

2014-11-11 Thread Jinzhi Chen
before the initialization of journal file. Signed-off-by: Jinzhi Chen --- include/work.h | 1 + lib/work.c | 8 ++-- sheep/sheep.c | 7 +++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/work.h b/include/work.h index b2fa0cf..c2008ba 100644 --- a/include

Re: [sheepdog] [PATCH] init trace for work queue before journal init

2014-11-23 Thread Jinzhi Chen
u think Thanks Jinzhi Chen > On Nov 13, 2014, at 10:07 AM, Hitoshi Mitake > wrote: > > At Wed, 12 Nov 2014 14:21:22 +0800, > Jinzhi Chen wrote: >> >> when journal thread init before the initialization of trace, >> it enter into loop (using uninitailized `tid_ma

[sheepdog] [PATCH] init trace for work queue in dog command

2014-11-24 Thread Jinzhi Chen
when extrace `wq_trace_init` from `init_work_queue`, we need to call `wq_trace_init` before `init_work_queue` so that dog's new thread can work properly. Signed-off-by: Jinzhi Chen --- dog/dog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dog/dog.c b/dog/dog.c index 76925f1..3f

[sheepdog] problems about `dog vdi object location` when node is in gateway mode

2014-12-08 Thread Jinzhi Chen
d `dog vdi object location` cause it using uninitialized pointer (sd_store->exist). maybe we could check whether a node is in gateway mode in `local_oid_exist` function. and if that node is gateway, just return SD_RES_NO_OBJ. Thanks Jinzhi Chen -- sheepdog mailing list sheepdog@lists.

[sheepdog] [PATCH] sheep/ops.c: fix problem caused by uninitialized backend storage in gateway

2014-12-11 Thread Jinzhi Chen
`SD_RES_NO_OBJ` to avoid using uninitialized pointer. Signed-off-by: Jinzhi Chen --- sheep/ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sheep/ops.c b/sheep/ops.c index a617a83..44b3ed0 100644 --- a/sheep/ops.c +++ b/sheep/ops.c @@ -1073,6 +1073,9 @@ static int local_oid_exist(struct