Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: aa4bde63a2307636f5f64c03082aab80eb6dd27e
Parent: 4de775010f746bf2369e6d4904bc4439769ffb56
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Aug 13 15:50:31 2010 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 13 15:50:31 2010 -0500
gfs_controld: fix plock owner syncing
- The R_GOT_UNOWN flag was not always being set on resources when
the owner was set to 0. This would cause subsequent syncing of
plock state to write the incorrect owner into the checkpoint.
bz 617306
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/gfs_controld/plock.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/group/gfs_controld/plock.c b/group/gfs_controld/plock.c
index 710e73a..e487d41 100644
--- a/group/gfs_controld/plock.c
+++ b/group/gfs_controld/plock.c
@@ -1692,10 +1692,13 @@ static int unpack_section_buf(struct mountgroup *mg, char *numbuf,
int buflen)
INIT_LIST_HEAD(&r->waiters);
INIT_LIST_HEAD(&r->pending);
- if (cfgd_plock_ownership)
+ if (cfgd_plock_ownership) {
sscanf(numbuf, "r%llu.%d", &num, &owner);
- else
+ if (!owner)
+ r->flags |= R_GOT_UNOWN;
+ } else {
sscanf(numbuf, "r%llu", &num);
+ }
r->number = num;
r->owner = owner;
@@ -2175,6 +2178,7 @@ void purge_plocks(struct mountgroup *mg, int nodeid, int unmount)
if (r->owner == nodeid) {
r->owner = 0;
+ r->flags |= R_GOT_UNOWN;
send_pending_plocks(mg, r);
}