Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 4010dd2e3ffaa95630b74a889737aa6eef37d50e
Parent: 0fc5da5fdc190ed50e94640136fea177a900ea57
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Aug 13 15:59:59 2010 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Aug 17 14:52:39 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 624156
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 1b9120d..0d8c82d 100644
--- a/group/gfs_controld/plock.c
+++ b/group/gfs_controld/plock.c
@@ -1857,10 +1857,13 @@ static int unpack_section_buf(struct mountgroup *mg, char *numbuf,
int buflen)
INIT_LIST_HEAD(&r->waiters);
INIT_LIST_HEAD(&r->pending);
- if (config_plock_ownership)
+ if (config_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;
@@ -2335,6 +2338,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);
}