* [Ocfs2-devel] [PATCH 1/1] ocfs2/dlm: ocfs2 dlm umount skip migrating lockres
@ 2013-09-11 18:40 Tariq Saeed
2013-09-12 2:07 ` Joseph Qi
0 siblings, 1 reply; 4+ messages in thread
From: Tariq Saeed @ 2013-09-11 18:40 UTC (permalink / raw)
To: ocfs2-devel
umount thread could race with migrate handler thread receiving resource
migration request from other node. When this happens, migrating thread
could set this node as the master along with DLM_LOCK_RES_MIGRATING flag.
umount thread should skip migrating this newly owned lockres until
DLM_LOCK_RES_MIGRATING flag is unset by migrate handler thread. umount
thread will ultimately migrate this lockres during another pass of the
lockres hash list.
Signed-off-by: Tariq Saeed <tariq.x.saeed@oracle.com>
Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
---
fs/ocfs2/dlm/dlmmaster.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 33ecbe0..1643b58 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2360,6 +2360,10 @@ static int dlm_is_lockres_migrateable(struct dlm_ctxt *dlm,
if (res->owner != dlm->node_num)
return 0;
+ if (res->state & DLM_LOCK_RES_MIGRATING) {
+ return 0;
+ }
+
for (idx = DLM_GRANTED_LIST; idx <= DLM_BLOCKED_LIST; idx++) {
queue = dlm_list_idx_to_ptr(res, idx);
list_for_each_entry(lock, queue, list) {
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 1/1] ocfs2/dlm: ocfs2 dlm umount skip migrating lockres
2013-09-11 18:40 [Ocfs2-devel] [PATCH 1/1] ocfs2/dlm: ocfs2 dlm umount skip migrating lockres Tariq Saeed
@ 2013-09-12 2:07 ` Joseph Qi
2013-09-12 4:00 ` Srinivas Eeda
0 siblings, 1 reply; 4+ messages in thread
From: Joseph Qi @ 2013-09-12 2:07 UTC (permalink / raw)
To: ocfs2-devel
On 2013/9/12 2:40, Tariq Saeed wrote:
> umount thread could race with migrate handler thread receiving resource
> migration request from other node. When this happens, migrating thread
> could set this node as the master along with DLM_LOCK_RES_MIGRATING flag.
> umount thread should skip migrating this newly owned lockres until
> DLM_LOCK_RES_MIGRATING flag is unset by migrate handler thread. umount
> thread will ultimately migrate this lockres during another pass of the
> lockres hash list.
>
> Signed-off-by: Tariq Saeed <tariq.x.saeed@oracle.com>
> Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
> ---
> fs/ocfs2/dlm/dlmmaster.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
> index 33ecbe0..1643b58 100644
> --- a/fs/ocfs2/dlm/dlmmaster.c
> +++ b/fs/ocfs2/dlm/dlmmaster.c
> @@ -2360,6 +2360,10 @@ static int dlm_is_lockres_migrateable(struct dlm_ctxt *dlm,
> if (res->owner != dlm->node_num)
> return 0;
>
> + if (res->state & DLM_LOCK_RES_MIGRATING) {
> + return 0;
> + }
> +
> for (idx = DLM_GRANTED_LIST; idx <= DLM_BLOCKED_LIST; idx++) {
> queue = dlm_list_idx_to_ptr(res, idx);
> list_for_each_entry(lock, queue, list) {
>
This patch was sent before by Jiufei Xue on Aug 2012, which was titled
as "ocfs2: delay migration when the lockres is in migration state".
Please refer the below link for details:
https://oss.oracle.com/pipermail/ocfs2-devel/2012-August/008670.html
As I remembered, the patch was alerady acked by Sunil and Joel, and then
it was in ocfs2.git.
I am not sure why it wasn't merged to mainline.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 1/1] ocfs2/dlm: ocfs2 dlm umount skip migrating lockres
2013-09-12 2:07 ` Joseph Qi
@ 2013-09-12 4:00 ` Srinivas Eeda
2013-09-20 20:56 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Srinivas Eeda @ 2013-09-12 4:00 UTC (permalink / raw)
To: ocfs2-devel
Joseph,
thanks for pointing it out.
Andrew,
can you please pull the following patch acked by Sunil and Joel
https://oss.oracle.com/pipermail/ocfs2-devel/2012-August/008670.html
Thanks,
--Srini
On 09/11/2013 07:07 PM, Joseph Qi wrote:
> On 2013/9/12 2:40, Tariq Saeed wrote:
>> umount thread could race with migrate handler thread receiving resource
>> migration request from other node. When this happens, migrating thread
>> could set this node as the master along with DLM_LOCK_RES_MIGRATING flag.
>> umount thread should skip migrating this newly owned lockres until
>> DLM_LOCK_RES_MIGRATING flag is unset by migrate handler thread. umount
>> thread will ultimately migrate this lockres during another pass of the
>> lockres hash list.
>>
>> Signed-off-by: Tariq Saeed <tariq.x.saeed@oracle.com>
>> Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
>> ---
>> fs/ocfs2/dlm/dlmmaster.c | 4 ++++
>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
>> index 33ecbe0..1643b58 100644
>> --- a/fs/ocfs2/dlm/dlmmaster.c
>> +++ b/fs/ocfs2/dlm/dlmmaster.c
>> @@ -2360,6 +2360,10 @@ static int dlm_is_lockres_migrateable(struct dlm_ctxt *dlm,
>> if (res->owner != dlm->node_num)
>> return 0;
>>
>> + if (res->state & DLM_LOCK_RES_MIGRATING) {
>> + return 0;
>> + }
>> +
>> for (idx = DLM_GRANTED_LIST; idx <= DLM_BLOCKED_LIST; idx++) {
>> queue = dlm_list_idx_to_ptr(res, idx);
>> list_for_each_entry(lock, queue, list) {
>>
> This patch was sent before by Jiufei Xue on Aug 2012, which was titled
> as "ocfs2: delay migration when the lockres is in migration state".
> Please refer the below link for details:
> https://oss.oracle.com/pipermail/ocfs2-devel/2012-August/008670.html
>
> As I remembered, the patch was alerady acked by Sunil and Joel, and then
> it was in ocfs2.git.
> I am not sure why it wasn't merged to mainline.
>
>
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 1/1] ocfs2/dlm: ocfs2 dlm umount skip migrating lockres
2013-09-12 4:00 ` Srinivas Eeda
@ 2013-09-20 20:56 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2013-09-20 20:56 UTC (permalink / raw)
To: ocfs2-devel
On Wed, 11 Sep 2013 21:00:20 -0700 Srinivas Eeda <srinivas.eeda@oracle.com> wrote:
> Andrew,
> can you please pull the following patch acked by Sunil and Joel
>
> https://oss.oracle.com/pipermail/ocfs2-devel/2012-August/008670.html
Yup. I just went through Joel's old linux-next tree and stole
everything from it:
From: Joel Becker <jlbec@evilplan.org>
Subject: ocfs2: don't spam on -EDQUOT
From: Akinobu Mita <akinobu.mita@gmail.com>
Subject: ocfs2: use bitmap_weight()
From: Xue jiufei <xuejiufei@huawei.com>
Subject: ocfs2: skip locks in the blocked list
From: Xue jiufei <xuejiufei@huawei.com>
Subject: ocfs2: delay migration when the lockres is in migration state
From: Akinobu Mita <akinobu.mita@gmail.com>
Subject: ocfs2: use find_last_bit()
From: Junxiao Bi <junxiao.bi@oracle.com>
Subject: ocfs2: break useless while loop
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-20 20:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 18:40 [Ocfs2-devel] [PATCH 1/1] ocfs2/dlm: ocfs2 dlm umount skip migrating lockres Tariq Saeed
2013-09-12 2:07 ` Joseph Qi
2013-09-12 4:00 ` Srinivas Eeda
2013-09-20 20:56 ` Andrew Morton
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.