Gitweb:
http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=b5e48c2e...
Commit: b5e48c2ee2af3440bb9f348536042aff45660d3f
Parent: 9ad6aa0dadde3997e0fe8018af06db99fe13ba82
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Aug 13 15:20:06 2010 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 13 15:20:06 2010 -0500
Revert "dlm_controld: fix save_plocks initialization"
This bug description and fix were incorrect. dlm_controld
should only begin saving plocks after the point in time where
the ckpt_node writes the checkpoint. plock messages prior to
that will be reflected in the checkpointed state. dlm_controld
should ignore plock messages prior to the point in time where
the ckpt_node writes the checkpoint.
This reverts commit cad14d81f7f4a6adbdf762d7775c52f95807eae2.
---
group/dlm_controld/cpg.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index 899d23e..2e5a1bb 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -1137,9 +1137,9 @@ static void receive_plocks_stored(struct lockspace *ls, struct
dlm_header *hd,
return;
}
+ process_saved_plocks(ls);
ls->need_plocks = 0;
ls->save_plocks = 0;
- process_saved_plocks(ls);
}
static void send_info(struct lockspace *ls, struct change *cg, int type,
@@ -1284,10 +1284,6 @@ static void prepare_plocks(struct lockspace *ls)
}
ls->plock_ckpt_node = our_nodeid;
ls->need_plocks = 0;
- if (ls->save_plocks) {
- ls->save_plocks = 0;
- process_saved_plocks(ls);
- }
return;
}
@@ -1300,10 +1296,7 @@ static void prepare_plocks(struct lockspace *ls)
if (!ls->plock_ckpt_node) {
ls->need_plocks = 0;
- if (ls->save_plocks) {
- ls->save_plocks = 0;
- process_saved_plocks(ls);
- }
+ ls->save_plocks = 0;
return;
}
@@ -1311,8 +1304,10 @@ static void prepare_plocks(struct lockspace *ls)
existing plock state in the ckpt to the time that we read that state
from the ckpt. */
- if (ls->need_plocks)
+ if (ls->need_plocks) {
+ ls->save_plocks = 1;
return;
+ }
if (ls->plock_ckpt_node != our_nodeid)
return;
@@ -1794,7 +1789,6 @@ int dlm_join_lockspace(struct lockspace *ls)
ls->cpg_fd = fd;
ls->kernel_stopped = 1;
ls->need_plocks = 1;
- ls->save_plocks = 1;
ls->joining = 1;
memset(&name, 0, sizeof(name));