mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@citi.umich.edu>
To: linux-nfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, neilb@suse.de,
	Trond.Myklebust@netapp.com,
	"NAKANO Hiroaki" <nakano.hiroaki@oss.ntt.co.jp>,
	"Fernando Luis Vázquez Cao" <fernando@oss.ntt.co.jp>,
	"J. Bruce Fields" <bfields@citi.umich.edu>
Subject: [PATCH 1/2] locks: allow lockd to process blocked locks during grace period
Date: Tue, 19 Aug 2008 18:12:42 -0400	[thread overview]
Message-ID: <1219183963-17476-1-git-send-email-bfields@citi.umich.edu> (raw)
In-Reply-To: <20080819221209.GF8331@fieldses.org>

The check here is currently harmless but unnecessary, since, as the
comment notes, there aren't any blocked-lock callbacks to process
during the grace period anyway.

And eventually we want to allow multiple grace periods that come and go
for different filesystems over the course of the lifetime of lockd, at
which point this check is just going to get in the way.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 fs/lockd/svc.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 1553fec..bdc607b 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -158,15 +158,9 @@ lockd(void *vrqstp)
 			continue;
 		}
 
-		/*
-		 * Retry any blocked locks that have been notified by
-		 * the VFS. Don't do this during grace period.
-		 * (Theoretically, there shouldn't even be blocked locks
-		 * during grace period).
-		 */
-		if (!nlmsvc_grace_period) {
-			timeout = nlmsvc_retry_blocked();
-		} else if (time_before(grace_period_expire, jiffies))
+		timeout = nlmsvc_retry_blocked();
+
+		if (time_before(grace_period_expire, jiffies))
 			clear_grace_period();
 
 		/*
-- 
1.5.5.rc1


  reply	other threads:[~2008-08-19 22:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-14 11:08 [PATCH]lockd: fix handling of grace period after long periods of inactivity NAKANO Hiroaki
2008-08-14 19:06 ` J. Bruce Fields
2008-08-15  1:32   ` Fernando Luis Vázquez Cao
2008-08-19 22:12     ` J. Bruce Fields
2008-08-19 22:12       ` J. Bruce Fields [this message]
2008-08-19 22:12         ` [PATCH 2/2] lockd: don't depend on lockd main loop to end grace J. Bruce Fields
2008-08-20  1:31       ` [PATCH]lockd: fix handling of grace period after long periods of inactivity Fernando Luis Vázquez Cao

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=1219183963-17476-1-git-send-email-bfields@citi.umich.edu \
    --to=bfields@citi.umich.edu \
    --cc=Trond.Myklebust@netapp.com \
    --cc=fernando@oss.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nakano.hiroaki@oss.ntt.co.jp \
    --cc=neilb@suse.de \
    /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

all inboxes | Powered by JetHome®