+ knfsd-fix-bug-in-recent-lockd-patches-that-can-cause-reclaim-to-fail.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     knfsd: Fix bug in recent lockd patches that can cause reclaim to fail.

has been added to the -mm tree.  Its filename is

     knfsd-fix-bug-in-recent-lockd-patches-that-can-cause-reclaim-to-fail.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: knfsd: Fix bug in recent lockd patches that can cause reclaim to fail.
From: NeilBrown <neilb@xxxxxxx>

When an nfs server shuts down, lockd needs to release all the locks even
though the client still holds them.

It should therefore not 'unmonitor' the clients, so that the files in nfs/sm
will still be there when the nfs server restarts, so that those clients will
be told to reclaim their locks.

However the hosts are fully unmonitored, so statd may well remove the files.

lockd has a test for 'sm_sticky' and avoid the unmonitor call if it is set,
but it is currently not set.

So set it when tearing down lockd.

Signed-off-by: Neil Brown <neilb@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/lockd/svcsubs.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletion(-)

diff -puN fs/lockd/svcsubs.c~knfsd-fix-bug-in-recent-lockd-patches-that-can-cause-reclaim-to-fail fs/lockd/svcsubs.c
--- a/fs/lockd/svcsubs.c~knfsd-fix-bug-in-recent-lockd-patches-that-can-cause-reclaim-to-fail
+++ a/fs/lockd/svcsubs.c
@@ -324,7 +324,17 @@ nlmsvc_same_host(struct nlm_host *host, 
 static int
 nlmsvc_is_client(struct nlm_host *host, struct nlm_host *dummy)
 {
-	return host->h_server;
+	if (host->h_server)
+	{
+		/* we are destroying locks even though the client
+		 * hasn't asked us too, so don't unmonitor the
+		 * client
+		 */
+		if (host->h_nsmhandle)
+			host->h_nsmhandle->sm_sticky = 1;
+		return 1;
+	} else
+		return 0;
 }
 
 /*
_

Patches currently in -mm which might be from neilb@xxxxxxx are

md-fix-proc-mdstat-refcounting.patch
knfsd-add-nfs-export-support-to-tmpfs.patch
knfsd-nfsd4-fix-owner-override-on-open.patch
knfsd-nfsd4-fix-open-permission-checking.patch
knfsd-nfsd4-fix-error-handling-in-nfsds-callback-client.patch
knfsd-fix-bug-in-recent-lockd-patches-that-can-cause-reclaim-to-fail.patch
knfsd-allow-lockd-to-drop-replys-as-appropriate.patch
lockdep-annotate-nfs-nfsd-in-kernel-sockets.patch
lockdep-annotate-nfs-nfsd-in-kernel-sockets-tidy.patch
convert-cpu-hotplug-notifiers-to-use-raw_notifier-instead-of-blocking_notifier.patch
remove-lock_key-approach-to-managing-nested-bd_mutex-locks.patch
simplify-some-aspects-of-bd_mutex-nesting.patch
use-mutex_lock_nested-for-bd_mutex-to-avoid-lockdep-warning.patch
avoid-lockdep-warning-in-md.patch
md-conditionalize-some-code.patch
md-dm-reduce-stack-usage-with-stacked-block-devices.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux