linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [patch 02/12] dlm: resend lookups
Date: Fri, 15 Jul 2005 18:34:52 +0800	[thread overview]
Message-ID: <20050715103452.GE17316@redhat.com> (raw)

[-- Attachment #1: resend-lookups.patch --]
[-- Type: text/plain, Size: 1371 bytes --]

During recovery, set the RESEND flag on locks waiting for a lookup so
they'll be resent when recovery completes.

Signed-off-by: David Teigland <teigland@redhat.com>

Index: linux-2.6.12-mm1/drivers/dlm/lock.c
===================================================================
--- linux-2.6.12-mm1.orig/drivers/dlm/lock.c
+++ linux-2.6.12-mm1/drivers/dlm/lock.c
@@ -3212,12 +3212,20 @@ void dlm_recover_waiters_pre(struct dlm_
 	down(&ls->ls_waiters_sem);
 
 	list_for_each_entry_safe(lkb, safe, &ls->ls_waiters, lkb_wait_reply) {
-		if (!dlm_is_removed(ls, lkb->lkb_nodeid))
-			continue;
-
 		log_debug(ls, "pre recover waiter lkid %x type %d flags %x",
 			  lkb->lkb_id, lkb->lkb_wait_type, lkb->lkb_flags);
 
+		/* all outstanding lookups, regardless of destination  will be
+		   resent after recovery is done */
+
+		if (lkb->lkb_wait_type == DLM_MSG_LOOKUP) {
+			lkb->lkb_flags |= DLM_IFL_RESEND;
+			continue;
+		}
+
+		if (!dlm_is_removed(ls, lkb->lkb_nodeid))
+			continue;
+
 		switch (lkb->lkb_wait_type) {
 
 		case DLM_MSG_REQUEST:
@@ -3244,11 +3252,6 @@ void dlm_recover_waiters_pre(struct dlm_
 			put_lkb(lkb);
 			break;
 
-		case DLM_MSG_LOOKUP:
-			/* all outstanding lookups, regardless of dest.
-			   will be resent after recovery is done */
-			break;
-
 		default:
 			log_error(ls, "invalid lkb wait_type %d",
 				  lkb->lkb_wait_type);

--

                 reply	other threads:[~2005-07-15 10:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050715103452.GE17316@redhat.com \
    --to=teigland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).