Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38760
b: refs/heads/master
c: f7da790
h: refs/heads/master
v: v3
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Jul 26, 2006
1 parent a449d4f commit 9ac3e27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5de6319b1839300ba6b461ed19531cdab90db9fc
refs/heads/master: f7da790d743d2f0b4f39e4fa442079b3b54f3bef
16 changes: 15 additions & 1 deletion trunk/fs/dlm/recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ static void set_master_lkbs(struct dlm_rsb *r)
/*
* Propogate the new master nodeid to locks
* The NEW_MASTER flag tells dlm_recover_locks() which rsb's to consider.
* The NEW_MASTER2 flag tells recover_lvb() which rsb's to consider.
* The NEW_MASTER2 flag tells recover_lvb() and set_locks_purged() which
* rsb's to consider.
*/

static void set_new_master(struct dlm_rsb *r, int nodeid)
Expand Down Expand Up @@ -681,6 +682,16 @@ static void recover_conversion(struct dlm_rsb *r)
}
}

/* We've become the new master for this rsb and waiting/converting locks may
need to be granted in dlm_grant_after_purge() due to locks that may have
existed from a removed node. */

static void set_locks_purged(struct dlm_rsb *r)
{
if (!list_empty(&r->res_waitqueue) || !list_empty(&r->res_convertqueue))
rsb_set_flag(r, RSB_LOCKS_PURGED);
}

void dlm_recover_rsbs(struct dlm_ls *ls)
{
struct dlm_rsb *r;
Expand All @@ -694,10 +705,13 @@ void dlm_recover_rsbs(struct dlm_ls *ls)
if (is_master(r)) {
if (rsb_flag(r, RSB_RECOVER_CONVERT))
recover_conversion(r);
if (rsb_flag(r, RSB_NEW_MASTER2))
set_locks_purged(r);
recover_lvb(r);
count++;
}
rsb_clear_flag(r, RSB_RECOVER_CONVERT);
rsb_clear_flag(r, RSB_NEW_MASTER2);
unlock_rsb(r);
}
up_read(&ls->ls_root_sem);
Expand Down

0 comments on commit 9ac3e27

Please sign in to comment.