* [Ocfs2-devel] a patch on ocfs2
@ 2007-04-17 2:41 wengang wang
2007-04-17 9:51 ` Sunil Mushran
2007-04-17 20:21 ` [Ocfs2-devel] [PATCH] ocfs2_dlm: add spinlock protection before __dlm_print_one_lock_resource is called wengang wang
0 siblings, 2 replies; 4+ messages in thread
From: wengang wang @ 2007-04-17 2:41 UTC (permalink / raw)
To: ocfs2-devel
Hi Sunil,
I found a bug on ocfs2 covering both 1.2.4 and 1.2.5.
it's simple, please see the patch on 1.2.5(pasted below):
--- ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c.orig 2007-04-17
17:28:08.000000000 -0400
+++ ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c 2007-04-17
17:28:38.000000000 -0400
@@ -490,7 +490,9 @@
"cookie=%u:%llu\n",
dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)),
dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie)));
+ spin_lock(&res->spinlock);
__dlm_print_one_lock_resource(res);
+ spin_unlock(&res->spinlock);
goto leave;
}
--
Wengang Wang
Member of Technical Staff
Oracle China Development Center
Open Source Technologies Development
Tel: +86 10 8278 6265
Mobile: +86 13381078925
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] a patch on ocfs2
2007-04-17 2:41 [Ocfs2-devel] a patch on ocfs2 wengang wang
@ 2007-04-17 9:51 ` Sunil Mushran
2007-04-17 20:21 ` [Ocfs2-devel] [PATCH] ocfs2_dlm: add spinlock protection before __dlm_print_one_lock_resource is called wengang wang
1 sibling, 0 replies; 4+ messages in thread
From: Sunil Mushran @ 2007-04-17 9:51 UTC (permalink / raw)
To: ocfs2-devel
Remove the spinlocks. Instead remove the leading underscores....
Replace __dlm_print_one_lock_resource() with dlm_print_one_lock_resource().
And resubmit.
Also read the "The Perfect Patch" in http://oss.oracle.com/osswiki/OCFS2.
Your patch, while good, is missing the header and Signed-off-by lines.
Case in point:
http://kernel/~smushran/patches/dlm-fix_lockres_refcnt.patch
If you still have qs, maybe quickest if you ping Tao/Tiger.
Thanks
Sunil
wengang wang wrote:
> Hi Sunil,
>
> I found a bug on ocfs2 covering both 1.2.4 and 1.2.5.
> it's simple, please see the patch on 1.2.5(pasted below):
>
>
> --- ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c.orig 2007-04-17
> 17:28:08.000000000 -0400
> +++ ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c 2007-04-17
> 17:28:38.000000000 -0400
> @@ -490,7 +490,9 @@
> "cookie=%u:%llu\n",
>
> dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)),
>
> dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie)));
> + spin_lock(&res->spinlock);
> __dlm_print_one_lock_resource(res);
> + spin_unlock(&res->spinlock);
> goto leave;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2_dlm: add spinlock protection before __dlm_print_one_lock_resource is called
2007-04-17 2:41 [Ocfs2-devel] a patch on ocfs2 wengang wang
2007-04-17 9:51 ` Sunil Mushran
@ 2007-04-17 20:21 ` wengang wang
2007-04-17 20:41 ` [Ocfs2-devel] " wengang wang
1 sibling, 1 reply; 4+ messages in thread
From: wengang wang @ 2007-04-17 20:21 UTC (permalink / raw)
To: ocfs2-devel
ocfs2_dlm: add spinlock protection per __dlm_print_one_lock_resource
calling
In dlm_convert_lock_handler(), in case of !lock,
__dlm_print_one_lock_resource is called. __dlm_print_one_lock_resource
needs protection of spinlock on res->spinlock. current source lost that
protection.
use dlm_print_one_lock_resource instead of __dlm_print_one_lock_resource.
Signed-off-by: wengang wang <wen.gang.wang@oracle.com>
Index: ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c.orig 2007-04-18 11:15:36.000000000 -0400
+++ ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c 2007-04-18 11:16:00.000000000 -0400
@@ -490,7 +490,7 @@
"cookie=%u:%llu\n",
dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)),
dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie)));
- __dlm_print_one_lock_resource(res);
+ dlm_print_one_lock_resource(res);
goto leave;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] Re: [PATCH] ocfs2_dlm: add spinlock protection before __dlm_print_one_lock_resource is called
2007-04-17 20:21 ` [Ocfs2-devel] [PATCH] ocfs2_dlm: add spinlock protection before __dlm_print_one_lock_resource is called wengang wang
@ 2007-04-17 20:41 ` wengang wang
0 siblings, 0 replies; 4+ messages in thread
From: wengang wang @ 2007-04-17 20:41 UTC (permalink / raw)
To: ocfs2-devel
same problem happens on dlm_deref_lockres_worker(1.2.5 and 1.2.4) and
dlm_deref_lockres_handler(1.2.4 only)
fix is the same.
wengang wang wrote:
> ocfs2_dlm: add spinlock protection per __dlm_print_one_lock_resource
> calling
>
> In dlm_convert_lock_handler(), in case of !lock,
> __dlm_print_one_lock_resource is called. __dlm_print_one_lock_resource
> needs protection of spinlock on res->spinlock. current source lost
> that protection.
> use dlm_print_one_lock_resource instead of __dlm_print_one_lock_resource.
>
> Signed-off-by: wengang wang <wen.gang.wang@oracle.com>
>
> Index: ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c
>
> ===================================================================
> --- ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c.orig 2007-04-18
> 11:15:36.000000000 -0400
> +++ ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c 2007-04-18
> 11:16:00.000000000 -0400
> @@ -490,7 +490,7 @@
> "cookie=%u:%llu\n",
>
> dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)),
>
> dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie)));
> - __dlm_print_one_lock_resource(res);
> + dlm_print_one_lock_resource(res);
> goto leave;
> }
>
>
>
>
--
Wengang Wang
Member of Technical Staff
Oracle China Development Center
Open Source Technologies Development
Tel: +86 10 8278 6265
Mobile: +86 13381078925
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-17 20:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-17 2:41 [Ocfs2-devel] a patch on ocfs2 wengang wang
2007-04-17 9:51 ` Sunil Mushran
2007-04-17 20:21 ` [Ocfs2-devel] [PATCH] ocfs2_dlm: add spinlock protection before __dlm_print_one_lock_resource is called wengang wang
2007-04-17 20:41 ` [Ocfs2-devel] " wengang wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.