From 4010dd2e3ffaa95630b74a889737aa6eef37d50e Mon Sep 17 00:00:00 2001 From: David Teigland <teigland@redhat.com> Date: Fri, 13 Aug 2010 15:59:59 -0500 Subject: [PATCH 1/2] 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@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); } -- 1.7.1.1