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

Re: [NFS] [Linux-cluster] [RFC] NLM lock failover admin interface

J. Bruce Fields wrote:

On Mon, Jun 12, 2006 at 01:25:43AM -0400, Wendy Cheng wrote:
2. Adding a new flag into "exportfs" command, say "h", such that

  "exportfs -uh *:/export_path"

would un-export the entry and drop the NLM locks associated with the

What does the kernel interface end up looking like in that case?

Happy to see this new exportfs command gets positive response - it was our original pick too.

Uploaded is part of a draft version of 2.4 base kernel patch - we're cleaning up 2.6 patches at this moment. It basically adds a new export flag (NFSEXP_FOLOCK - note that ex_flags is an int but is currently only defined up to 16 bits) so nfs-util and kernel can communicate.

The nice thing about this approach is the recovery part - the take-over server can use the counter part command to export and set grace period for one particular interface within the same system call.

-- Wendy
--- linux-2.4.21-43.EL/fs/nfsd/export.c	2006-05-14 17:16:21.000000000 -0400
+++ linux/fs/nfsd/export.c	2006-05-29 02:13:29.000000000 -0400
@@ -388,6 +388,10 @@ exp_unexport(struct nfsctl_export *nxp)
 			err = 0;
+		if (nxp->ex_flags & NFSEXP_FOLOCK) {
+			dprintk("exp_unexport: nfsd_lockd_unexport called\n");
+			nfsd_lockd_unexport(clp);
+		}
--- linux-2.4.21-43.EL/include/linux/nfsd/export.h	2006-05-14 17:23:57.000000000 -0400
+++ linux/include/linux/nfsd/export.h	2006-05-29 02:12:07.000000000 -0400
@@ -42,7 +42,7 @@
 #define NFSEXP_FSID			0x2000
 #define NFSEXP_NOACL			0x8000	/* turn off acl support */
+#define NFSEXP_FOLOCK			0x00010000	/* NLM lock failover */
 #ifdef __KERNEL__

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