rpms/nfs-utils/devel nfs-utils-1.0.11-fsloc.patch, NONE, 1.1 nfs-utils-1.0.9-compile.patch, 1.1, 1.2 nfs-utils.spec, 1.117, 1.118 rpcgssd.init, 1.5, 1.6 nfs-utils-1.0.10-export-nosubtree.patch, 1.2, NONE nfs-utils-1.0.10-fsloc.patch, 1.1, NONE nfs-utils-1.0.9-idmap-dirscancb-listloop.patch, 1.1, NONE nfs-utils-1.0.9-idmapd-scandir-leak.patch, 1.1, NONE nfs-utils-1.0.9-krb5-memory.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Feb 22 21:49:35 UTC 2007


Author: steved

Update of /cvs/dist/rpms/nfs-utils/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv17640

Modified Files:
	nfs-utils-1.0.9-compile.patch nfs-utils.spec rpcgssd.init 
Added Files:
	nfs-utils-1.0.11-fsloc.patch 
Removed Files:
	nfs-utils-1.0.10-export-nosubtree.patch 
	nfs-utils-1.0.10-fsloc.patch 
	nfs-utils-1.0.9-idmap-dirscancb-listloop.patch 
	nfs-utils-1.0.9-idmapd-scandir-leak.patch 
	nfs-utils-1.0.9-krb5-memory.patch 
Log Message:
Upgraded to 1.0.11


nfs-utils-1.0.11-fsloc.patch:
 support/export/export.c    |    2 
 support/nfs/exports.c      |    4 
 utils/exportfs/exportfs.c  |    2 
 utils/exportfs/exports.man |   14 +++
 utils/mountd/fsloc.c       |  188 +++++++++++++++++++++++++++++++++++++++++++++
 utils/mountd/fsloc.h       |   50 +++++++++++
 6 files changed, 260 insertions(+)

--- NEW FILE nfs-utils-1.0.11-fsloc.patch ---
commit 8a19db9ff04e99cc2a7d612fd6020289af69de5e
Author: Fred Isaman <iisaman at citi.umich.edu>
Date:   Fri Jan 19 10:53:10 2007 -0500

    Extend the exportfs/mountd interface to pass fslocations info into the kernel
    
    Signed-off-by: Fred Isaman <iisaman at citi.umich.edu>
    Signed-off-by: Kevin Coffman <kwc at citi.umich.edu>
    
    Extend the exportfs/mountd interface to pass fslocations info into
    the kernel using syntax modelled after AIX.
    
    Adds "refer=" and "replicas=" to the options in /etc/exports
    to enable use of the kernel fslocation code.

diff --git a/support/export/export.c b/support/export/export.c
index cfb6681..a4b0788 100644
--- a/support/export/export.c
+++ b/support/export/export.c
@@ -240,6 +240,8 @@ export_freeall(void)
 				xfree(exp->m_export.e_sqgids);
 			if (exp->m_export.e_mountpoint)
 				free(exp->m_export.e_mountpoint);
+			if (exp->m_export.e_fslocdata)
+				xfree(exp->m_export.e_fslocdata);
 			xfree(exp);
 		}
 		exportlist[i] = NULL;
diff --git a/support/nfs/exports.c b/support/nfs/exports.c
index 60cfe48..9638015 100644
--- a/support/nfs/exports.c
+++ b/support/nfs/exports.c
@@ -236,9 +236,11 @@ putexportent(struct exportent *ep)
 	case FSLOC_REPLICA:
 		fprintf(fp, "replicas=%s,", ep->e_fslocdata);
 		break;
+#ifdef DEBUG
 	case FSLOC_STUB:
 		fprintf(fp, "fsloc=stub,");
 		break;
+#endif
 	default:
 		xlog(L_ERROR, "unknown fsloc method for %s:%s",
 		     ep->e_hostname, ep->e_path);
@@ -504,6 +506,7 @@ bad_option:
 				ep->e_mountpoint = strdup(mp+1);
 			else
 				ep->e_mountpoint = strdup("");
+#ifdef DEBUG
 		} else if (strncmp(opt, "fsloc=", 6) == 0) {
 			if (strcmp(opt+6, "stub") == 0)
 				ep->e_fslocmethod = FSLOC_STUB;
@@ -512,6 +515,7 @@ bad_option:
 				     flname, flline, opt);
 				goto bad_option;
 			}
+#endif
 		} else if (strncmp(opt, "refer=", 6) == 0) {
 			ep->e_fslocmethod = FSLOC_REFER;
 			ep->e_fslocdata = strdup(opt+6);
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index 40a6b56..22e13a3 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -427,9 +427,11 @@ dump(int verbose)
 			case FSLOC_REPLICA:
 				c = dumpopt(c, "replicas=%s", ep->e_fslocdata);
 				break;
+#ifdef DEBUG
 			case FSLOC_STUB:
 				c = dumpopt(c, "fsloc=stub");
 				break;
+#endif
 			}
 			printf("%c\n", (c != '(')? ')' : ' ');
 		}
diff --git a/utils/exportfs/exports.man b/utils/exportfs/exports.man
index 27a30f9..ab63b03 100644
--- a/utils/exportfs/exports.man
+++ b/utils/exportfs/exports.man
@@ -348,6 +348,20 @@ If the client asks for alternative locat
 will be given this list of alternatives. (Note that actual replication
 of the filesystem must be handled elsewhere.)
 
+.TP
+.IR refer= path at host[+host][:path at host[+host]]
+A client referencing the export point will be directed to choose from
+the given list an alternative location for the filesystem.
+(Note that the server must have a mountpoint here, though a different
+filesystem is not required; so, for example,
+.IR "mount --bind" " /path /path"
+is sufficient.)
+.TP
+.IR replicas= path at host[+host][:path at host[+host]]
+If the client asks for alternative locations for the export point, it
+will be given this list of alternatives. (Note that actual replication
+of the filesystem must be handled elsewhere.)
+
 .SS User ID Mapping
 .PP
 .I nfsd
diff --git a/utils/mountd/fsloc.c b/utils/mountd/fsloc.c
new file mode 100644
index 0000000..46aaf0b
--- /dev/null
+++ b/utils/mountd/fsloc.c
@@ -0,0 +1,188 @@
+/*
+ * COPYRIGHT (c) 2006
+ * THE REGENTS OF THE UNIVERSITY OF MICHIGAN
+ * ALL RIGHTS RESERVED
+ *
+ * Permission is granted to use, copy, create derivative works
+ * and redistribute this software and such derivative works
+ * for any purpose, so long as the name of The University of
+ * Michigan is not used in any advertising or publicity
+ * pertaining to the use of distribution of this software
+ * without specific, written prior authorization.  If the
+ * above copyright notice or any other identification of the
+ * University of Michigan is included in any copy of any
+ * portion of this software, then the disclaimer below must
+ * also be included.
+ *
+ * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION
+ * FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY
+ * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF
+ * MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
+ * WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ * REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE
+ * FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR
+ * CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN
+ * IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGES.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+
+#include "fsloc.h"
+#include "exportfs.h"
+
+/* Debugging tool: prints out @servers info to syslog */
+static void replicas_print(struct servers *sp)
+{
+	int i;
+	if (!sp) {
+		xlog(L_NOTICE, "NULL replicas pointer\n");
+		return;
+	}
+	xlog(L_NOTICE, "replicas listsize=%i\n", sp->h_num);
+	for (i=0; i<sp->h_num; i++) {
+		xlog(L_NOTICE, "    %s:%s\n",
+		       sp->h_mp[i]->h_host, sp->h_mp[i]->h_path);
+	}
+}
+
+#ifdef DEBUG
+/* Called by setting 'Method = stub' in config file.  Just returns
+ * some syntactically correct gibberish for testing purposes.
+ */
+static struct servers *method_stub(char *key)
+{
+	struct servers *sp;
+	struct mount_point *mp;
+
+	xlog(L_NOTICE, "called method_stub\n");
+	sp = malloc(sizeof(struct servers));
+	if (!sp)
+		return NULL;
+	mp = calloc(1, sizeof(struct mount_point));
+	if (!mp) {
+		free(sp);
+		return NULL;
+	}
+	sp->h_num = 1;
+	sp->h_mp[0] = mp;
+	mp->h_host = strdup("stub_server");
+	mp->h_path = strdup("/my/test/path");
+	sp->h_referral = 1;
+	return sp;
+}
+#endif	/* DEBUG */
+
+/* Scan @list, which is a NULL-terminated array of strings of the
+ * form path at host[+host], and return corresponding servers structure.
+ */
+static struct servers *parse_list(char **list)
+{
+	int i;
+	struct servers *res;
+	struct mount_point *mp;
+	char *cp;
+
+	res = malloc(sizeof(struct servers));
+	if (!res)
+		return NULL;
+	res->h_num = 0;
+
+	/* parse each of the answers in sucession. */
+	for (i=0; list[i] && i<FSLOC_MAX_LIST; i++) {
+		mp = calloc(1, sizeof(struct mount_point));
+		if (!mp) {
+			release_replicas(res);
+			return NULL;
+		}
+		cp = strchr(list[i], '@');
+		if ((!cp) || list[i][0] != '/') {
+			xlog(L_WARNING, "invalid entry '%s'", list[i]);
+			continue; /* XXX Need better error handling */
+		}
+		res->h_mp[i] = mp;
+		res->h_num++;
+		mp->h_path = strndup(list[i], cp - list[i]);
+		cp++;
+		mp->h_host = strdup(cp);
+		/* hosts are '+' separated, kernel expects ':' separated */
+		while ( (cp = strchr(mp->h_host, '+')) )
+		       *cp = ':';
+	}
+	return res;
+}
+
+/* @data is a string of form path at host[+host][:path at host[+host]]
+ */
+static struct servers *method_list(char *data)
+{
+	char *copy, *ptr=data;
+	char **list;
+	int i, listsize;
+	struct servers *rv=NULL;
+
+	xlog(L_NOTICE, "method_list(%s)\n", data);
+	for (ptr--, listsize=1; ptr; ptr=index(ptr, ':'), listsize++)
+		ptr++;
+	list = malloc(listsize * sizeof(char *));
+	copy = strdup(data);
+	if (copy)
+		xlog(L_NOTICE, "converted to %s\n", copy);
+	if (list && copy) {
+		ptr = copy;
+		for (i=0; i<listsize; i++) {
+			list[i] = strsep(&ptr, ":");
+		}
+		rv = parse_list(list);
+	}
+	free(copy);
+	free(list);
+	replicas_print(rv);
+	return rv;
+}
+
+/* Returns appropriately filled struct servers, or NULL if had a problem */
+struct servers *replicas_lookup(int method, char *data, char *key)
+{
+	struct servers *sp=NULL;
+	switch(method) {
+	case FSLOC_NONE:
+		break;
+	case FSLOC_REFER:
+		sp = method_list(data);
+		if (sp)
+			sp->h_referral = 1;
+		break;
+	case FSLOC_REPLICA:
+		sp = method_list(data);
+		if (sp)
+			sp->h_referral = 0;
+		break;
+#ifdef DEBUG
+	case FSLOC_STUB:
+		sp = method_stub(data);
+		break;
+#endif
+	default:
+		xlog(L_WARNING, "Unknown method = %i", method);
+	}
+	replicas_print(sp);
+	return sp;
+}
+
+void release_replicas(struct servers *server)
+{
+	int i;
+
+	if (!server) return;
+	for (i = 0; i < server->h_num; i++) {
+		free(server->h_mp[i]->h_host);
+		free(server->h_mp[i]->h_path);
+		free(server->h_mp[i]);
+	}
+	free(server);
+}
diff --git a/utils/mountd/fsloc.h b/utils/mountd/fsloc.h
new file mode 100644
index 0000000..8296d1c
--- /dev/null
+++ b/utils/mountd/fsloc.h
@@ -0,0 +1,50 @@
+/*
+ * COPYRIGHT (c) 2006
+ * THE REGENTS OF THE UNIVERSITY OF MICHIGAN
+ * ALL RIGHTS RESERVED
+ *
+ * Permission is granted to use, copy, create derivative works
+ * and redistribute this software and such derivative works
+ * for any purpose, so long as the name of The University of
+ * Michigan is not used in any advertising or publicity
+ * pertaining to the use of distribution of this software
+ * without specific, written prior authorization.  If the
+ * above copyright notice or any other identification of the
+ * University of Michigan is included in any copy of any
+ * portion of this software, then the disclaimer below must
+ * also be included.
+ *
+ * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION
+ * FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY
+ * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF
+ * MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
+ * WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ * REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE
+ * FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR
+ * CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING
+ * OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN
+ * IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGES.
+ */
+
+#ifndef FSLOC_H
+#define FSLOC_H
+
+#define FSLOC_MAX_LIST 40
+
+struct mount_point {
+	char *h_host;
+	char *h_path;
+};
+
+struct servers {
+	int h_num;
+	struct mount_point *h_mp[FSLOC_MAX_LIST];
+	int h_referral;		/* 0=replica, 1=referral */
+};
+
+struct servers *replicas_lookup(int method, char *data, char *key);
+void release_replicas(struct servers *server);
+
+#endif /* FSLOC_H */

nfs-utils-1.0.9-compile.patch:
 Makefile.am          |    1 -
 aclocal/kerberos5.m4 |    2 ++
 configure.in         |    3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

Index: nfs-utils-1.0.9-compile.patch
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/nfs-utils-1.0.9-compile.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nfs-utils-1.0.9-compile.patch	11 Sep 2006 18:48:54 -0000	1.1
+++ nfs-utils-1.0.9-compile.patch	22 Feb 2007 21:49:33 -0000	1.2
@@ -9,15 +9,6 @@
                     -f $dir/lib/libgssapi_krb5.so \) ; then
           AC_DEFINE(HAVE_KRB5, 1, [Define this if you have MIT Kerberos libraries])
           KRBDIR="$dir"
---- nfs-utils-1.0.9/tools/Makefile.am.orig	2006-07-07 20:04:32.000000000 -0400
-+++ nfs-utils-1.0.9/tools/Makefile.am	2006-09-11 14:39:11.000000000 -0400
-@@ -1,5 +1,5 @@
- ## Process this file with automake to produce Makefile.in
- 
--SUBDIRS = getiversion getkversion locktest rpcdebug rpcgen nlmtest
-+SUBDIRS = locktest rpcdebug rpcgen nlmtest
- 
- MAINTAINERCLEANFILES = Makefile.in
 --- nfs-utils-1.0.9/Makefile.am.orig	2006-07-07 20:04:32.000000000 -0400
 +++ nfs-utils-1.0.9/Makefile.am	2006-09-11 14:38:39.000000000 -0400
 @@ -47,7 +47,6 @@


Index: nfs-utils.spec
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/nfs-utils.spec,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- nfs-utils.spec	21 Feb 2007 17:17:32 -0000	1.117
+++ nfs-utils.spec	22 Feb 2007 21:49:33 -0000	1.118
@@ -1,7 +1,7 @@
 Summary: NFS utlilities and supporting clients and daemons for the kernel NFS server.
 Name: nfs-utils
-Version: 1.0.10
-Release: 7%{?dist}
+Version: 1.0.11
+Release: 1%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -16,7 +16,7 @@
 # will allow NFS to use FS-Cache.
 %define enablefscache 1
 
-Source0: http://www.kernel.org/pub/linux/utils/nfs/nfs-utils-1.0.10.tar.bz2
+Source0: http://www.kernel.org/pub/linux/utils/nfs/%{name}-%{version}.tar.bz2
 Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.gz
 
 Source10: nfs.init
@@ -30,10 +30,7 @@
 Patch52: nfs-utils-1.0.6-idmap.conf.patch
 Patch53: nfs-utils-1.0.6-gssd_mixed_case.patch
 Patch54: nfs-utils-1.0.8-privports.patch
-Patch55: nfs-utils-1.0.9-krb5-memory.patch
-Patch56: nfs-utils-1.0.9-idmapd-scandir-leak.patch
-Patch57: nfs-utils-1.0.9-idmap-dirscancb-listloop.patch
-Patch58: nfs-utils-1.0.10-fsloc.patch
+Patch55: nfs-utils-1.0.11-fsloc.patch
 
 %if %{enablemount}
 Patch70: nfs-utils-1.0.9-mount-options-v3.patch
@@ -43,11 +40,10 @@
 Patch74: nfs-utils-1.0.9-return-mount-error.patch
 Patch75: nfs-utils-1.0.9-nfsmount-authnone.patch
 Patch76: nfs-utils-1.0.9-mount-remount.patch
-Patch77: nfs-utils-1.0.10-export-nosubtree.patch
-Patch78: nfs-utils-1.0.10-mount-nfsvers.patch
-Patch79: nfs-utils-1.0.10-udp-no-connect.patch
-Patch80: nfs-utils-1.0.10-v4-umounts.patch
-Patch81: nfs-utils-1.0.9-mount-quotes.patch
+Patch77: nfs-utils-1.0.10-mount-nfsvers.patch
+Patch78: nfs-utils-1.0.10-udp-no-connect.patch
+Patch79: nfs-utils-1.0.10-v4-umounts.patch
+Patch80: nfs-utils-1.0.9-mount-quotes.patch
 
 %if %{enablefscache}
 Patch90: nfs-utils-1.0.9-mount-fsc.patch
@@ -101,9 +97,6 @@
 %patch53 -p1
 %patch54 -p1
 %patch55 -p1
-%patch56 -p1
-%patch57 -p1
-%patch58 -p1
 %if %{enablemount}
 %patch70 -p1
 %patch71 -p1
@@ -116,7 +109,6 @@
 %patch78 -p1
 %patch79 -p1
 %patch80 -p1
-%patch81 -p1
 %if %{enablefscache}
 %patch90 -p1
 %endif
@@ -273,7 +265,6 @@
 /sbin/rpc.statd
 /usr/sbin/exportfs
 /usr/sbin/nfsstat
-/usr/sbin/nhfs*
 /usr/sbin/rpcdebug
 /usr/sbin/rpc.mountd
 /usr/sbin/rpc.nfsd
@@ -294,6 +285,9 @@
 %endif
 
 %changelog
+* Thu Feb 22 2007 Steve Dickson <steved at redhat.com> 1.0.11-1
+- Upgraded to 1.0.11 
+
 * Wed Feb 21 2007 Steve Dickson <steved at redhat.com> 1.0.10-7
 - Added FS_Location support
 


Index: rpcgssd.init
===================================================================
RCS file: /cvs/dist/rpms/nfs-utils/devel/rpcgssd.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- rpcgssd.init	11 Jan 2006 21:55:51 -0000	1.5
+++ rpcgssd.init	22 Feb 2007 21:49:33 -0000	1.6
@@ -31,7 +31,7 @@
 
 
 # Try to use machine credentials by default
-OPTIONS=""
+OPTIONS="-M"
 RETVAL=0
 LOCKFILE=/var/lock/subsys/rpcgssd
 prog="rpc.gssd"


--- nfs-utils-1.0.10-export-nosubtree.patch DELETED ---


--- nfs-utils-1.0.10-fsloc.patch DELETED ---


--- nfs-utils-1.0.9-idmap-dirscancb-listloop.patch DELETED ---


--- nfs-utils-1.0.9-idmapd-scandir-leak.patch DELETED ---


--- nfs-utils-1.0.9-krb5-memory.patch DELETED ---




More information about the fedora-cvs-commits mailing list