Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: delay the migration when the lockres is in recovery

2010-07-19 Thread Wengang Wang
Any comment on this? wengang. On 10-05-25 15:59, Wengang Wang wrote: We shouldn't migrate a lockres in recovery state. Otherwise, it has the following problem: 1) Recovery happened as recovery master on a node(node A) which is in umount migrating all lockres' it owned(master is node A) to

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: correct the refmap on recovery master

2010-07-19 Thread Wengang Wang
Any comment? On 10-06-11 00:25, Wengang Wang wrote: If the dlm recovery goes on the non-master node where purging work is going on, There could be unexpected reference left on some lockres' on recovery master. That is because we migrated the lockres' to recovery master but didn't send

[Ocfs2-devel] [PATCH 1/1] ocfs2 fix o2dlm dlm run purgelist (rev 3)

2010-07-19 Thread Srinivas Eeda
This patch fixes two problems in dlm_run_purgelist 1. If a lockres is found to be in use, dlm_run_purgelist keeps trying to purge the same lockres instead of trying the next lockres. 2. When a lockres is found unused, dlm_run_purgelist releases lockres spinlock before setting

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: remove potential deadlock -V2

2010-07-19 Thread Sunil Mushran
A better (and simpler) fix would be to not dlm_grab() in dlm_init_lockres(). Then we can remove the corresponding dlm_put() in dlm_lockres_release(). That grab is not required because we don't call dlm_unregister_domain() based on refcount. On 07/19/2010 03:11 AM, Wengang Wang wrote: Any

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: correct the refmap on recovery master

2010-07-19 Thread Sunil Mushran
Srini has a patch that handles a race concerning DLM_LOCK_RES_DROPPING_REF. You may want to look a this afresh with that patch. My problem with this patch is that the description is not clear. That is because we migrated the lockres' to recovery master but didn't send deref requests to it

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: fix a dead lock

2010-07-19 Thread Wengang Wang
Just a reminder. wengang. On 10-07-16 23:13, Wengang Wang wrote: When we have to take both dlm-master_lock and lockres-spinlock, take them in order lockres-spinlock and then dlm-master_lock. The patch fixes a violation of the rule. We can simply move taking dlm-master_lock to where we

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: correct the refmap on recovery master

2010-07-19 Thread Wengang Wang
On 10-07-19 16:52, Sunil Mushran wrote: Srini has a patch that handles a race concerning DLM_LOCK_RES_DROPPING_REF. You may want to look a this afresh with that patch. My problem with this patch is that the description is not clear. That is because we migrated the lockres' to recovery

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: remove potential deadlock -V2

2010-07-19 Thread Wengang Wang
Very cool fix! I will post the patch after test. regards, wengang. On 10-07-19 16:14, Sunil Mushran wrote: A better (and simpler) fix would be to not dlm_grab() in dlm_init_lockres(). Then we can remove the corresponding dlm_put() in dlm_lockres_release(). That grab is not required because we