Hello community,
here is the log from the commit of package nfs-utils for openSUSE:Factory
checked in at Mon Oct 11 17:03:22 CEST 2010.
--------
--- nfs-utils/nfs-utils.changes 2010-08-11 06:37:20.000000000 +0200
+++ nfs-utils/nfs-utils.changes 2010-10-11 08:23:54.000000000 +0200
@@ -1,0 +2,8 @@
+Mon Oct 11 06:17:55 UTC 2010 - nfbrown@novell.com
+
+- new upstream version 1.2.3, plus some upstream fix-up patches.
+- new user 'statd' owns /var/lib/nfs so rpc.statd runs as non-root.
+- New commands 'mountstats' and 'nfsiostat'
+- ipv6 support enabled as it is believed to be complete.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
nfs-utils-1.2.1.tar.bz2
nfs-utils-eperm-fallback.patch
nfs-v2-disable.patch
New:
----
nfs-utils-1.2.3.tar.bz2
nfs-utils-allow-port-number-sharing
nfs-utils-clear-mountd-reg
nfs-utils-fix-remount
nfs-utils-improve-v4-umount
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nfs-utils.spec ++++++
--- /var/tmp/diff_new_pack.cf5B2p/_old 2010-10-11 16:57:43.000000000 +0200
+++ /var/tmp/diff_new_pack.cf5B2p/_new 2010-10-11 16:57:43.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package nfs-utils (Version 1.2.1)
+# spec file for package nfs-utils (Version 1.2.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -26,8 +26,8 @@
%endif
Url: http://nfs.sourceforge.net
Summary: Support Utilities for Kernel nfsd
-Version: 1.2.1
-Release: 8
+Version: 1.2.3
+Release: 1
Group: Productivity/Networking/NFS
License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -50,8 +50,10 @@
Source13: nfs-utils.rpmlintrc
Patch0: nfs-utils-1.0.7-bind-syntax.patch
Patch1: warn-nfs-udp.patch
-Patch2: nfs-utils-eperm-fallback.patch
-Patch3: nfs-v2-disable.patch
+Patch2: nfs-utils-clear-mountd-reg
+Patch3: nfs-utils-allow-port-number-sharing
+Patch4: nfs-utils-improve-v4-umount
+Patch5: nfs-utils-fix-remount
%description
This package contains the NFS utilities. You can tune the number of
@@ -132,6 +134,8 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
cp %{S:6} .
%build
@@ -142,6 +146,7 @@
--disable-rquotad \
--enable-nfsv4 \
--enable-gss \
+ --enable-ipv6 \
--enable-mount \
--enable-mountconfig \
--with-krb5=/usr/lib/mit
@@ -189,7 +194,13 @@
%clean
rm -rf $RPM_BUILD_ROOT
+%pre -n nfs-client
+useradd -r -c 'NFS statd daemon' \
+ -s /sbin/nologin -d /var/lib/nfs -g nogroup statd &> /dev/null || :
+
%post -n nfs-client
+chown statd:nogroup /var/lib/nfs
+chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || :
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{fillup_and_insserv -Y -n nfs nfs}
%run_permissions
@@ -201,6 +212,7 @@
%restart_on_update nfs
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%insserv_cleanup
+#userdel statd &> /dev/null || :
%verifyscript -n nfs-client
%verify_permissions -e /sbin/mount.nfs
@@ -229,6 +241,8 @@
/sbin/umount.nfs4
/usr/sbin/gss_clnt_send_err
/usr/sbin/gss_destroy_creds
+/usr/sbin/mountstats
+/usr/sbin/nfsiostat
/usr/sbin/nfsstat
/usr/sbin/rcnfs
/usr/sbin/rpc.gssd
@@ -238,7 +252,6 @@
/usr/sbin/showmount
/usr/sbin/sm-notify
/usr/sbin/start-statd
-%{_mandir}/man5/idmapd.conf.5.gz
%{_mandir}/man5/nfsmount.conf.5.gz
%{_mandir}/man5/nfs.5.gz
%{_mandir}/man8/mount.nfs.8.gz
@@ -255,13 +268,15 @@
%{_mandir}/man8/rpc.statd.8.gz
%{_mandir}/man8/rpcdebug.8.gz
%{_mandir}/man8/statd.8.gz
+%{_mandir}/man8/mountstats.8.gz
+%{_mandir}/man8/nfsiostat.8.gz
/var/adm/fillup-templates/sysconfig.nfs
-%dir /var/lib/nfs
+%attr(0700,statd,nogroup) %dir /var/lib/nfs
%dir /var/lib/nfs/rpc_pipefs
%dir /var/lib/nfs/v4recovery
-%dir /var/lib/nfs/sm
-%dir /var/lib/nfs/sm.bak
-%ghost /var/lib/nfs/state
+%attr(0700,statd,nogroup) %dir /var/lib/nfs/sm
+%attr(0700,statd,nogroup) %dir /var/lib/nfs/sm.bak
+%attr(0700,statd,nogroup) %ghost /var/lib/nfs/state
%config %attr(0644,root,root) /etc/sysconfig/SuSEfirewall2.d/services/nfs-client
%files -n nfs-kernel-server
++++++ nfs-utils-1.0.7-bind-syntax.patch ++++++
--- /var/tmp/diff_new_pack.cf5B2p/_old 2010-10-11 16:57:43.000000000 +0200
+++ /var/tmp/diff_new_pack.cf5B2p/_new 2010-10-11 16:57:43.000000000 +0200
@@ -6,9 +6,9 @@
support/nfs/exports.c | 2 ++
1 file changed, 2 insertions(+)
---- nfs-utils-1.2.1.orig/support/nfs/exports.c
-+++ nfs-utils-1.2.1/support/nfs/exports.c
-@@ -621,6 +621,8 @@ bad_option:
+--- nfs-utils-1.2.3.orig/support/nfs/exports.c
++++ nfs-utils-1.2.3/support/nfs/exports.c
+@@ -626,6 +626,8 @@ bad_option:
} else if (strncmp(opt, "replicas=", 9) == 0) {
ep->e_fslocmethod = FSLOC_REPLICA;
ep->e_fslocdata = strdup(opt+9);
++++++ nfs-utils-1.2.1.tar.bz2 -> nfs-utils-1.2.3.tar.bz2 ++++++
++++ 66811 lines of diff (skipped)
++++++ nfs-utils-allow-port-number-sharing ++++++
Return-Path:
Received: from imap.suse.de ([unix socket])
by imap-int (Cyrus v2.2.12) with LMTPA;
Mon, 11 Oct 2010 02:04:28 +0200
X-Sieve: CMU Sieve 2.2
Received: from relay2.suse.de (relay2.suse.de [149.44.160.134])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (verified OK))
by imap.suse.de (Postfix) with ESMTP id B80213C416B3
for ; Mon, 11 Oct 2010 02:04:28 +0200 (CEST)
Received: by relay2.suse.de (Postfix)
id AF29918552E3; Mon, 11 Oct 2010 02:04:28 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by relay2.suse.de (Postfix) with ESMTP id A50CF18552E2
for ; Mon, 11 Oct 2010 02:04:28 +0200 (CEST)
Received: from relay2.suse.de ([127.0.0.1])
by localhost (localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP
id 32384-06 for ; Mon, 11 Oct 2010 02:04:28 +0200 (CEST)
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
by relay2.suse.de (Postfix) with ESMTP id 176F918552E1
for ; Mon, 11 Oct 2010 02:04:28 +0200 (CEST)
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mx2.suse.de (Postfix) with ESMTP id 3DF178738D
for ; Mon, 11 Oct 2010 02:04:27 +0200 (CEST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1752531Ab0JKAE0 (ORCPT );
Sun, 10 Oct 2010 20:04:26 -0400
Received: from mail-iw0-f174.google.com ([209.85.214.174]:38170 "EHLO
mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1752478Ab0JKAEZ (ORCPT
); Sun, 10 Oct 2010 20:04:25 -0400
Received: by mail-iw0-f174.google.com with SMTP id 6so2668490iwn.19
for ; Sun, 10 Oct 2010 17:04:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:sender:from:subject:to:cc
:date:message-id:in-reply-to:references:user-agent:mime-version
:content-type:content-transfer-encoding;
bh=p2zLfgG57Hoog2u8Nx9BqYK1eLzauQztAhKLfA0ovCc=;
b=Moj09Wjm/0sGd3s1gZ3pdl/AILLNaOxcLoyJop30g6BLy71VyuvuiqJVI8BA/GgUdz
ZjjyN1bmS9PxPeAOA+q9mSoBjGjtPbjaluaUI0ug2+JL8lD4CMNbxKfK9CCHWKcvHaRW
+Qn1dl8IOsMG001J55q7fMb5i6P5BKLWL3K40=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=sender:from:subject:to:cc:date:message-id:in-reply-to:references
:user-agent:mime-version:content-type:content-transfer-encoding;
b=KzYoZ2QjpVFdjEbZoH1oFvCr73lBTdM9bQf2t99cDg3ow75LMw+HQpWAMilBl63ZuW
Afi8GxcX/PscsMvVo6Mp1GuVvnZtT/3wAMbIT4e/KnxQ6R4DOkDmkmoQ6pVEq/Qg0Imp
GPbGYhXrowpY++sKoMvNzXc/J/rZYaXCSVlhM=
Received: by 10.231.30.134 with SMTP id u6mr4142696ibc.121.1286755464696;
Sun, 10 Oct 2010 17:04:24 -0700 (PDT)
Received: from ellison.1015granger.net (adsl-76-241-169-38.dsl.sfldmi.sbcglobal.net [76.241.169.38])
by mx.google.com with ESMTPS id u6sm6554693ibd.0.2010.10.10.17.04.22
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Sun, 10 Oct 2010 17:04:23 -0700 (PDT)
From: Chuck Lever
Subject: [PATCH 02/15] libnfs.a: Allow multiple RPC listeners to share
listener port number
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Date: Sun, 10 Oct 2010 20:04:21 -0400
Message-ID: <20101011000421.6667.60700.stgit@ellison.1015granger.net>
In-Reply-To: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
References: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
User-Agent: StGIT/0.14.3
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Sender: linux-nfs-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: linux-nfs@vger.kernel.org
X-Virus-Scanned: by amavisd-new at localhost
X-Spam-Status: No, score=-7.599 tagged_above=-20 required=5
tests=[BAYES_00=-2.599, MY_LINUX=-1, RCVD_IN_DNSWL_MED=-4]
X-Spam-Score: -7.599
X-Spam-Level:
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2
Normally, when "-p" is not specified on the mountd command line, the
TI-RPC library chooses random port numbers for each listener. If a
port number _is_ specified on the command line, all the listeners
will get the same port number, so SO_REUSEADDR needs to be set on
each socket.
Thus we can't let TI-RPC create the listener sockets for us in this
case; we must create them ourselves and then set SO_REUSEADDR (and
other socket options) by hand.
Different versions of the same RPC program have to share the same
listener and SVCXPRT, so we have to cache xprts we create, and re-use
them when additional requests for registration come from the
application.
Though it doesn't look like it, this fix was "copied" from the legacy
rpc_init() function. It's more complicated for TI-RPC, of course,
since a TI-RPC application can set up listeners with a nearly
arbitrary number of address families and socket types, not just the
two listeners that legacy RPC applications can set up (one for AF_INET
UDP and one for AF_INET TCP).
See:
https://bugzilla.linux-nfs.org/show_bug.cgi?id=190
Signed-off-by: Chuck Lever
---
support/nfs/svc_create.c | 252 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 246 insertions(+), 6 deletions(-)
diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c
index 59ba505..b3f75ed 100644
--- a/support/nfs/svc_create.c
+++ b/support/nfs/svc_create.c
@@ -27,6 +27,7 @@
#include
#include
#include
+#include
#include
#include
@@ -41,11 +42,68 @@
#include "tcpwrapper.h"
#endif
+#include "sockaddr.h"
#include "rpcmisc.h"
#include "xlog.h"
#ifdef HAVE_LIBTIRPC
+#define SVC_CREATE_XPRT_CACHE_SIZE (8)
+static SVCXPRT *svc_create_xprt_cache[SVC_CREATE_XPRT_CACHE_SIZE] = { NULL, };
+
+/*
+ * Cache an SVC xprt, in case there are more programs or versions to
+ * register against it.
+ */
+static void
+svc_create_cache_xprt(SVCXPRT *xprt)
+{
+ unsigned int i;
+
+ /* Check if we've already got this one... */
+ for (i = 0; i < SVC_CREATE_XPRT_CACHE_SIZE; i++)
+ if (svc_create_xprt_cache[i] == xprt)
+ return;
+
+ /* No, we don't. Cache it. */
+ for (i = 0; i < SVC_CREATE_XPRT_CACHE_SIZE; i++)
+ if (svc_create_xprt_cache[i] == NULL) {
+ svc_create_xprt_cache[i] = xprt;
+ return;
+ }
+
+ xlog(L_ERROR, "%s: Failed to cache an xprt", __func__);
+}
+
+/*
+ * Find a previously cached SVC xprt structure with the given bind address
+ * and transport semantics.
+ *
+ * Returns pointer to a cached SVC xprt.
+ *
+ * If no matching SVC XPRT can be found, NULL is returned.
+ */
+static SVCXPRT *
+svc_create_find_xprt(const struct sockaddr *bindaddr, const struct netconfig *nconf)
+{
+ unsigned int i;
+
+ for (i = 0; i < SVC_CREATE_XPRT_CACHE_SIZE; i++) {
+ SVCXPRT *xprt = svc_create_xprt_cache[i];
+ struct sockaddr *sap;
+
+ if (xprt == NULL)
+ continue;
+ if (strcmp(nconf->nc_netid, xprt->xp_netid) != 0)
+ continue;
+ sap = (struct sockaddr *)xprt->xp_ltaddr.buf;
+ if (!nfs_compare_sockaddr(bindaddr, sap))
+ continue;
+ return xprt;
+ }
+ return NULL;
+}
+
/*
* Set up an appropriate bind address, given @port and @nconf.
*
@@ -98,17 +156,113 @@ svc_create_bindaddr(struct netconfig *nconf, const uint16_t port)
return ai;
}
+/*
+ * Create a listener socket on a specific bindaddr, and set
+ * special socket options to allow it to share the same port
+ * as other listeners.
+ *
+ * Returns an open, bound, and possibly listening network
+ * socket on success.
+ *
+ * Otherwise returns -1 if some error occurs.
+ */
+static int
+svc_create_sock(const struct sockaddr *sap, socklen_t salen,
+ struct netconfig *nconf)
+{
+ int fd, type, protocol;
+ int one = 1;
+
+ switch(nconf->nc_semantics) {
+ case NC_TPI_CLTS:
+ type = SOCK_DGRAM;
+ break;
+ case NC_TPI_COTS_ORD:
+ type = SOCK_STREAM;
+ break;
+ default:
+ xlog(D_GENERAL, "%s: Unrecognized bind address semantics: %u",
+ __func__, nconf->nc_semantics);
+ return -1;
+ }
+
+ if (strcmp(nconf->nc_proto, NC_UDP) == 0)
+ protocol = (int)IPPROTO_UDP;
+ else if (strcmp(nconf->nc_proto, NC_TCP) == 0)
+ protocol = (int)IPPROTO_TCP;
+ else {
+ xlog(D_GENERAL, "%s: Unrecognized bind address protocol: %s",
+ __func__, nconf->nc_proto);
+ return -1;
+ }
+
+ fd = socket((int)sap->sa_family, type, protocol);
+ if (fd == -1) {
+ xlog(L_ERROR, "Could not make a socket: (%d) %m",
+ errno);
+ return -1;
+ }
+
+#ifdef IPV6_SUPPORTED
+ if (sap->sa_family == AF_INET6) {
+ if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY,
+ &one, sizeof(one)) == -1) {
+ xlog(L_ERROR, "Failed to set IPV6_V6ONLY: (%d) %m",
+ errno);
+ (void)close(fd);
+ return -1;
+ }
+ }
+#endif /* IPV6_SUPPORTED */
+
+ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
+ &one, sizeof(one)) == -1) {
+ xlog(L_ERROR, "Failed to set SO_REUSEADDR: (%d) %m",
+ errno);
+ (void)close(fd);
+ return -1;
+ }
+
+ if (bind(fd, sap, salen) == -1) {
+ xlog(L_ERROR, "Could not bind socket: (%d) %m",
+ errno);
+ (void)close(fd);
+ return -1;
+ }
+
+ if (nconf->nc_semantics == NC_TPI_COTS_ORD)
+ if (listen(fd, SOMAXCONN) == -1) {
+ xlog(L_ERROR, "Could not listen on socket: (%d) %m",
+ errno);
+ (void)close(fd);
+ return -1;
+ }
+
+ return fd;
+}
+
+/*
+ * The simple case is allowing the TI-RPC library to create a
+ * transport itself, given just the bind address and transport
+ * semantics.
+ *
+ * Our local xprt cache is ignored in this path, since the
+ * caller is not interested in sharing listeners or ports, and
+ * the library automatically avoids ports already in use.
+ *
+ * Returns the count of started listeners (one or zero).
+ */
static unsigned int
-svc_create_nconf(const char *name, const rpcprog_t program,
+svc_create_nconf_rand_port(const char *name, const rpcprog_t program,
const rpcvers_t version,
void (*dispatch)(struct svc_req *, SVCXPRT *),
- const uint16_t port, struct netconfig *nconf)
+ struct netconfig *nconf)
{
struct t_bind bindaddr;
struct addrinfo *ai;
SVCXPRT *xprt;
- ai = svc_create_bindaddr(nconf, port);
+ ai = svc_create_bindaddr(nconf, 0);
if (ai == NULL)
return 0;
@@ -119,7 +273,7 @@ svc_create_nconf(const char *name, const rpcprog_t program,
freeaddrinfo(ai);
if (xprt == NULL) {
xlog(D_GENERAL, "Failed to create listener xprt "
- "(%s, %u, %s)", name, version, nconf->nc_netid);
+ "(%s, %u, %s)", name, version, nconf->nc_netid);
return 0;
}
@@ -133,6 +287,93 @@ svc_create_nconf(const char *name, const rpcprog_t program,
return 1;
}
+/*
+ * If a port is specified on the command line, that port value will be
+ * the same for all listeners created here. Create each listener
+ * socket in advance and set SO_REUSEADDR, rather than allowing the
+ * RPC library to create the listeners for us on a randomly chosen
+ * port via svc_tli_create(RPC_ANYFD).
+ *
+ * Some callers want to listen for more than one RPC version using the
+ * same port number. For example, mountd could want to listen for MNT
+ * version 1, 2, and 3 requests. This means mountd must use the same
+ * set of listener sockets for multiple RPC versions, since, on one
+ * system, you can't have two listener sockets with the exact same
+ * bind address (and port) and transport protocol.
+ *
+ * To accomplish this, this function caches xprts as they are created.
+ * This cache is checked to see if a previously created xprt can be
+ * used, before creating a new xprt for this [program, version]. If
+ * there is a cached xprt with the same bindaddr and transport
+ * semantics, we simply register the new version with that xprt,
+ * rather than creating a fresh xprt for it.
+ *
+ * The xprt cache implemented here is local to a process. Two
+ * separate RPC daemons can not share a set of listeners.
+ *
+ * Returns the count of started listeners (one or zero).
+ */
+static unsigned int
+svc_create_nconf_fixed_port(const char *name, const rpcprog_t program,
+ const rpcvers_t version,
+ void (*dispatch)(struct svc_req *, SVCXPRT *),
+ const uint16_t port, struct netconfig *nconf)
+{
+ struct addrinfo *ai;
+ SVCXPRT *xprt;
+
+ ai = svc_create_bindaddr(nconf, port);
+ if (ai == NULL)
+ return 0;
+
+ xprt = svc_create_find_xprt(ai->ai_addr, nconf);
+ if (xprt == NULL) {
+ int fd;
+
+ fd = svc_create_sock(ai->ai_addr, ai->ai_addrlen, nconf);
+ if (fd == -1)
+ goto out_free;
+
+ xprt = svc_tli_create(fd, nconf, NULL, 0, 0);
+ if (xprt == NULL) {
+ xlog(D_GENERAL, "Failed to create listener xprt "
+ "(%s, %u, %s)", name, version, nconf->nc_netid);
+ (void)close(fd);
+ goto out_free;
+ }
+ }
+
+ if (!svc_reg(xprt, program, version, dispatch, nconf)) {
+ /* svc_reg(3) destroys @xprt in this case */
+ xlog(D_GENERAL, "Failed to register (%s, %u, %s)",
+ name, version, nconf->nc_netid);
+ goto out_free;
+ }
+
+ svc_create_cache_xprt(xprt);
+
+ freeaddrinfo(ai);
+ return 1;
+
+out_free:
+ freeaddrinfo(ai);
+ return 0;
+}
+
+static unsigned int
+svc_create_nconf(const char *name, const rpcprog_t program,
+ const rpcvers_t version,
+ void (*dispatch)(struct svc_req *, SVCXPRT *),
+ const uint16_t port, struct netconfig *nconf)
+{
+ if (port != 0)
+ return svc_create_nconf_fixed_port(name, program,
+ version, dispatch, port, nconf);
+
+ return svc_create_nconf_rand_port(name, program,
+ version, dispatch, nconf);
+}
+
/**
* nfs_svc_create - start up RPC svc listeners
* @name: C string containing name of new service
@@ -145,8 +386,7 @@ svc_create_nconf(const char *name, const rpcprog_t program,
* the RPC dispatcher. Returns the number of started network transports.
*/
unsigned int
-nfs_svc_create(__attribute__((unused)) char *name,
- const rpcprog_t program, const rpcvers_t version,
+nfs_svc_create(char *name, const rpcprog_t program, const rpcvers_t version,
void (*dispatch)(struct svc_req *, SVCXPRT *),
const uint16_t port)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
++++++ nfs-utils-clear-mountd-reg ++++++
Return-Path:
Received: from imap.suse.de ([unix socket])
by imap-int (Cyrus v2.2.12) with LMTPA;
Mon, 11 Oct 2010 02:04:17 +0200
X-Sieve: CMU Sieve 2.2
Received: from relay1.suse.de (relay1.suse.de [149.44.160.133])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (verified OK))
by imap.suse.de (Postfix) with ESMTP id 0A65F3C416B3
for ; Mon, 11 Oct 2010 02:04:17 +0200 (CEST)
Received: by relay1.suse.de (Postfix)
id 01A90344BA64; Mon, 11 Oct 2010 02:04:17 +0200 (CEST)
Received: from relay1.suse.de (localhost [127.0.0.1])
by relay1.suse.de (Postfix) with ESMTP id EAE7C344BA63
for ; Mon, 11 Oct 2010 02:04:16 +0200 (CEST)
Received: from relay1.suse.de ([127.0.0.1])
by relay1.suse.de (relay1.suse.de [127.0.0.1]) (amavisd-new, port 10026)
with ESMTP id 06582-10 for ;
Mon, 11 Oct 2010 02:04:16 +0200 (CEST)
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
by relay1.suse.de (Postfix) with ESMTP id A9C85344BA61
for ; Mon, 11 Oct 2010 02:04:16 +0200 (CEST)
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mx2.suse.de (Postfix) with ESMTP id 48FDA8738D
for ; Mon, 11 Oct 2010 02:04:16 +0200 (CEST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1752517Ab0JKAEP (ORCPT );
Sun, 10 Oct 2010 20:04:15 -0400
Received: from mail-iw0-f174.google.com ([209.85.214.174]:38170 "EHLO
mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1752478Ab0JKAEO (ORCPT
); Sun, 10 Oct 2010 20:04:14 -0400
Received: by mail-iw0-f174.google.com with SMTP id 6so2668490iwn.19
for ; Sun, 10 Oct 2010 17:04:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:sender:from:subject:to:cc
:date:message-id:in-reply-to:references:user-agent:mime-version
:content-type:content-transfer-encoding;
bh=t0jGXR6R6oFSOiIUs0mhcgc6DxuwAvaQUeA4K9C6P84=;
b=a4iSPFd5eQ0w0uyOCzEw0E44Ud/KpIE0iyhwHFBL7/yElckfZuR+8EbyeT2DdjMz/U
CBTTU+1m2Rl7Jgo+SvQqsYi84y86JzTzF70Yxyz9t3JlR5M1L4lnJpRqLQDQKBeFZcBF
xK7+GTLWxsMes1kGvXF9hP8wvMrtwDG+e2TQk=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=sender:from:subject:to:cc:date:message-id:in-reply-to:references
:user-agent:mime-version:content-type:content-transfer-encoding;
b=lTAr0b38PPzxyY95nnjiEMYRgiHw+BGTRAesblo6IygAHrBDQcd/2a0cCFPkxC0QH/
eGi1Nko+PqLCE197Av+G4OFIvf4TD6fePOfXcVcTy201y0Xv5keebgt1Qb+TBkFK/U3I
yQi/JS9/L3l9sZBfqmB6rvmqLodMbYhu87BQk=
Received: by 10.42.211.140 with SMTP id go12mr1536860icb.320.1286755454106;
Sun, 10 Oct 2010 17:04:14 -0700 (PDT)
Received: from ellison.1015granger.net (adsl-76-241-169-38.dsl.sfldmi.sbcglobal.net [76.241.169.38])
by mx.google.com with ESMTPS id gy41sm6556180ibb.23.2010.10.10.17.04.12
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Sun, 10 Oct 2010 17:04:13 -0700 (PDT)
From: Chuck Lever
Subject: [PATCH 01/15] mountd: Clear mountd registrations at start up
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Date: Sun, 10 Oct 2010 20:04:11 -0400
Message-ID: <20101011000411.6667.17979.stgit@ellison.1015granger.net>
In-Reply-To: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
References: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
User-Agent: StGIT/0.14.3
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Sender: linux-nfs-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: linux-nfs@vger.kernel.org
X-Virus-Scanned: by amavisd-new at relay1.suse.de
X-Spam-Status: No, score=-4.999 tagged_above=-20 required=5
tests=[BAYES_50=0.001, MY_LINUX=-1, RCVD_IN_DNSWL_MED=-4]
X-Spam-Score: -4.999
X-Spam-Level:
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2
Clear stale MNT registrations before mountd tries to create fresh
listeners, to ensure that mountd starts. This is also what statd
does.
Signed-off-by: Chuck Lever
---
utils/mountd/mountd.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c
index d309950..7e0cf6a 100644
--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -840,6 +840,7 @@ main(int argc, char **argv)
if (new_cache)
cache_open();
+ unregister_services();
if (version2()) {
listeners += nfs_svc_create("mountd", MOUNTPROG,
MOUNTVERS, mount_dispatch, port);
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
++++++ nfs-utils-fix-remount ++++++
Return-Path:
Received: from imap.suse.de ([unix socket])
by imap-int (Cyrus v2.2.12) with LMTPA;
Mon, 11 Oct 2010 02:06:35 +0200
X-Sieve: CMU Sieve 2.2
Received: from relay2.suse.de (relay2.suse.de [149.44.160.134])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (verified OK))
by imap.suse.de (Postfix) with ESMTP id BE1103C416B3
for ; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: by relay2.suse.de (Postfix)
id B466A18552E3; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
by relay2.suse.de (Postfix) with ESMTP id A9D7618552E2
for ; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: from relay2.suse.de ([127.0.0.1])
by localhost (localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP
id 29122-13 for ; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
by relay2.suse.de (Postfix) with ESMTP id 6B65518552E1
for ; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mx2.suse.de (Postfix) with ESMTP id 14B278738D
for ; Mon, 11 Oct 2010 02:06:35 +0200 (CEST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1752634Ab0JKAGe (ORCPT );
Sun, 10 Oct 2010 20:06:34 -0400
Received: from mail-iw0-f174.google.com ([209.85.214.174]:38170 "EHLO
mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1752630Ab0JKAGe (ORCPT
); Sun, 10 Oct 2010 20:06:34 -0400
Received: by mail-iw0-f174.google.com with SMTP id 6so2668490iwn.19
for ; Sun, 10 Oct 2010 17:06:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:sender:from:subject:to:cc
:date:message-id:in-reply-to:references:user-agent:mime-version
:content-type:content-transfer-encoding;
bh=UJO3paHucq6OlKM06UEb1TVN7QqzkPyXWN7fNztk7mQ=;
b=WGeehh2PC4rE1yirLXFQQ14UxrmfbbOCNqK2L2tESAaywDxoDSFRMJzdR885ARlMC9
GZwggetqRpo+LU2m36u2ZeE3gtOIFCZ23GClQbdRUiKKMwzRpWbP3vfEt7adJIV2RjsW
thMkV1EOnxeJMpP4IJdRRXxJ8tXkCaHjwzj38=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=sender:from:subject:to:cc:date:message-id:in-reply-to:references
:user-agent:mime-version:content-type:content-transfer-encoding;
b=kL7dvDU66o7mLvoqMOG0Xw/RxY3rj5LA9DjPUc79e+XB9OxHuwVhwbzwL0dCaBmD16
VhumTwhcPLN/wEkiuSMe/Tsu3di038gQL/nz6zBeszxC3JVrDO5aGw/DAsT0fcipVNyg
sJR3xvqRVFuH7VtO1a/HugVzTwMiCt+EBcvRY=
Received: by 10.231.12.133 with SMTP id x5mr2060586ibx.131.1286755593267;
Sun, 10 Oct 2010 17:06:33 -0700 (PDT)
Received: from ellison.1015granger.net (adsl-76-241-169-38.dsl.sfldmi.sbcglobal.net [76.241.169.38])
by mx.google.com with ESMTPS id gy41sm6552605ibb.11.2010.10.10.17.06.31
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Sun, 10 Oct 2010 17:06:32 -0700 (PDT)
From: Chuck Lever
Subject: [PATCH 15/15] mount.nfs: don't show "remount" flag in /etc/mtab
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Date: Sun, 10 Oct 2010 20:06:30 -0400
Message-ID: <20101011000630.6667.13971.stgit@ellison.1015granger.net>
In-Reply-To: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
References: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
User-Agent: StGIT/0.14.3
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Sender: linux-nfs-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: linux-nfs@vger.kernel.org
X-Virus-Scanned: by amavisd-new at localhost
X-Spam-Status: No, score=-4.999 tagged_above=-20 required=5
tests=[BAYES_50=0.001, MY_LINUX=-1, RCVD_IN_DNSWL_MED=-4]
X-Spam-Score: -4.999
X-Spam-Level:
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2
Don't add the 'remount' option to /etc/mtab. This is the same
behavior as file systems that use the monolithic /sbin/mount command.
See the MS_NOMTAB macro in utils-linux-ng/mount/mount.c.
Note that mount(8) has MS_USERS and MS_USER in the "nomtab" category
as well, but mount.nfs needs to record those values so that unmounting
a user-mounted NFS file system can work.
While we're here, fix some white space damage in fix_opts_string().
This is a partial fix for:
https://bugzilla.linux-nfs.org/show_bug.cgi?id=188
Signed-off-by: Chuck Lever
---
utils/mount/mount.c | 4 ++--
utils/mount/mount_constants.h | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
--- nfs-utils-1.2.3.orig/utils/mount/mount.c
+++ nfs-utils-1.2.3/utils/mount/mount.c
@@ -209,7 +209,7 @@ static char *fix_opts_string(int flags,
}
if (flags & MS_USERS)
new_opts = xstrconcat3(new_opts, ",users", "");
-
+
for (om = opt_map; om->opt != NULL; om++) {
if (om->skip)
continue;
@@ -281,7 +281,7 @@ static int add_mtab(char *spec, char *mo
ment.mnt_fsname = spec;
ment.mnt_dir = mount_point;
ment.mnt_type = fstype;
- ment.mnt_opts = fix_opts_string(flags, opts);
+ ment.mnt_opts = fix_opts_string(flags & ~MS_NOMTAB, opts);
ment.mnt_freq = freq;
ment.mnt_passno = pass;
--- nfs-utils-1.2.3.orig/utils/mount/mount_constants.h
+++ nfs-utils-1.2.3/utils/mount/mount_constants.h
@@ -64,4 +64,8 @@ if we have a stack or plain mount - moun
#define MS_MGC_MSK 0xffff0000 /* magic flag number mask */
#endif
+/* Generic options that are prevented from appearing
+ * in the options field in /etc/mtab. */
+#define MS_NOMTAB (MS_REMOUNT)
+
#endif /* _NFS_UTILS_MOUNT_CONSTANTS_H */
++++++ nfs-utils-improve-v4-umount ++++++
Return-Path:
Received: from imap.suse.de ([unix socket])
by imap-int (Cyrus v2.2.12) with LMTPA;
Mon, 11 Oct 2010 02:06:26 +0200
X-Sieve: CMU Sieve 2.2
Received: from relay1.suse.de (relay1.suse.de [149.44.160.133])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "relay.suse.de", Issuer "CAcert Class 3 Root" (verified OK))
by imap.suse.de (Postfix) with ESMTP id DDF033C416B3
for ; Mon, 11 Oct 2010 02:06:26 +0200 (CEST)
Received: by relay1.suse.de (Postfix)
id D5C57344BA64; Mon, 11 Oct 2010 02:06:26 +0200 (CEST)
Received: from relay1.suse.de (localhost [127.0.0.1])
by relay1.suse.de (Postfix) with ESMTP id CB887344BA63
for ; Mon, 11 Oct 2010 02:06:26 +0200 (CEST)
Received: from relay1.suse.de ([127.0.0.1])
by relay1.suse.de (relay1.suse.de [127.0.0.1]) (amavisd-new, port 10026)
with ESMTP id 05752-10 for ;
Mon, 11 Oct 2010 02:06:26 +0200 (CEST)
Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15])
by relay1.suse.de (Postfix) with ESMTP id 82936344BA61
for ; Mon, 11 Oct 2010 02:06:26 +0200 (CEST)
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mx2.suse.de (Postfix) with ESMTP id 0560C8738D
for ; Mon, 11 Oct 2010 02:06:26 +0200 (CEST)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1752633Ab0JKAGZ (ORCPT );
Sun, 10 Oct 2010 20:06:25 -0400
Received: from mail-iw0-f174.google.com ([209.85.214.174]:38170 "EHLO
mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1752630Ab0JKAGZ (ORCPT
); Sun, 10 Oct 2010 20:06:25 -0400
Received: by mail-iw0-f174.google.com with SMTP id 6so2668490iwn.19
for ; Sun, 10 Oct 2010 17:06:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:sender:from:subject:to:cc
:date:message-id:in-reply-to:references:user-agent:mime-version
:content-type:content-transfer-encoding;
bh=1dui3wv1qJqGDKTTO6lTgXqRJbuKWPHSrtmMEkpD7hs=;
b=vXeac3fZfpDsuWOMQbwU3mNfRKsvUjveCnLymxOiOUVf6/3mMfeTXvJLCw0YUB7H4u
xsJyFvmFmbeRUaK4urW63lqMp6ZZIcuioSUaS10SbiFvuoK1y5DX2w6rjYWblUQuXpao
nYJlG0vuogoUCGZfrrXL1tRJA+dgl7XDSjjhk=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=sender:from:subject:to:cc:date:message-id:in-reply-to:references
:user-agent:mime-version:content-type:content-transfer-encoding;
b=UiUdZXRO8dSOpNik05iHQfjFfwuBqGhgAIwHe4k+aUO9FvIGEDtsFub1GqSEvFKHll
obvKa3PfyOAt0PU6Az8+dMTEt0wRESkKVqMrxBWLkCDZ64/EE31FCCVTTvxQbVzB878Y
00pk3YJo+YPJmXsvclpbCl6LYYaBkfnqdJ/yA=
Received: by 10.231.32.140 with SMTP id c12mr3925655ibd.90.1286755583476;
Sun, 10 Oct 2010 17:06:23 -0700 (PDT)
Received: from ellison.1015granger.net (adsl-76-241-169-38.dsl.sfldmi.sbcglobal.net [76.241.169.38])
by mx.google.com with ESMTPS id x10sm6553992iba.10.2010.10.10.17.06.21
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Sun, 10 Oct 2010 17:06:22 -0700 (PDT)
From: Chuck Lever
Subject: [PATCH 14/15] umount.nfs: Distinguish between nfs4 and nfs mounts
To: steved@redhat.com
Cc: linux-nfs@vger.kernel.org
Date: Sun, 10 Oct 2010 20:06:20 -0400
Message-ID: <20101011000620.6667.79025.stgit@ellison.1015granger.net>
In-Reply-To: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
References: <20101010234836.6667.4057.stgit@ellison.1015granger.net>
User-Agent: StGIT/0.14.3
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Sender: linux-nfs-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: linux-nfs@vger.kernel.org
X-Virus-Scanned: by amavisd-new at relay1.suse.de
X-Spam-Status: No, score=-6.11 tagged_above=-20 required=5
tests=[BAYES_05=-1.11, MY_LINUX=-1, RCVD_IN_DNSWL_MED=-4]
X-Spam-Score: -6.11
X-Spam-Level:
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2
Neil Brown reports that umount.nfs is still confused by "-t nfs -o
vers=4" mounts.
/etc/mtab can be confused. /proc/mounts is authoritative on the
fstype of a mount. Have umount.nfs consult it to determine which
mechanism to use for unmounting. The code to read /proc/mounts was
lifted from the nfsstat command.
The code introduced by this patch may look like belt-n-suspenders, but
we have two use cases to consider:
1. Old kernels don't support the "vers=4" mount option, so
umount.nfs must look for the "nfs4" fstype
2. Upcoming kernels may eliminate support the "nfs4" fstype, so
umount.nfs must look for the "vers=4" mount option
Thus this logic checks for "nfs4" first then looks for the NFS version
setting.
Note that we could handle unmounting entirely in the kernel, but that
won't help older kernels that have this issue.
See:
https://bugzilla.linux-nfs.org/show_bug.cgi?id=189
Signed-off-by: Chuck Lever
---
utils/mount/nfsumount.c | 111 ++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 104 insertions(+), 7 deletions(-)
--- nfs-utils-1.2.3.orig/utils/mount/nfsumount.c
+++ nfs-utils-1.2.3/utils/mount/nfsumount.c
@@ -37,6 +37,9 @@
#include "parse_opt.h"
#include "parse_dev.h"
+#define MOUNTSFILE "/proc/mounts"
+#define LINELEN (4096)
+
#if !defined(MNT_FORCE)
/* dare not try to include -- lots of errors */
#define MNT_FORCE 1
@@ -241,6 +244,91 @@ static int nfs_umount23(const char *devn
return result;
}
+/*
+ * Detect NFSv4 mounts.
+ *
+ * Consult /proc/mounts to determine if the mount point
+ * is an NFSv4 mount. The kernel is authoritative about
+ * what type of mount this is.
+ *
+ * Returns 1 if "mc" is an NFSv4 mount, zero if not, and
+ * -1 if some error occurred.
+ */
+static int nfs_umount_is_vers4(const struct mntentchn *mc)
+{
+ char buffer[LINELEN], *next;
+ int retval;
+ FILE *f;
+
+ if ((f = fopen(MOUNTSFILE, "r")) == NULL) {
+ fprintf(stderr, "%s: %s\n",
+ MOUNTSFILE, strerror(errno));
+ return -1;
+ }
+
+ retval = -1;
+ while (fgets(buffer, sizeof(buffer), f) != NULL) {
+ char *device, *mntdir, *type, *flags;
+ struct mount_options *options;
+ char *line = buffer;
+
+ next = strchr(line, '\n');
+ if (next != NULL)
+ *next = '\0';
+
+ device = strtok(line, " \t");
+ if (device == NULL)
+ continue;
+ mntdir = strtok(NULL, " \t");
+ if (mntdir == NULL)
+ continue;
+ if (strcmp(device, mc->m.mnt_fsname) != 0 &&
+ strcmp(mntdir, mc->m.mnt_dir) != 0)
+ continue;
+
+ type = strtok(NULL, " \t");
+ if (type == NULL)
+ continue;
+ if (strcmp(type, "nfs4") == 0)
+ goto out_nfs4;
+
+ flags = strtok(NULL, " \t");
+ if (flags == NULL)
+ continue;
+ options = po_split(flags);
+ if (options != NULL) {
+ unsigned long version;
+ int rc;
+
+ rc = nfs_nfs_version(options, &version);
+ po_destroy(options);
+ if (rc && version == 4)
+ goto out_nfs4;
+ }
+
+ goto out_nfs;
+ }
+ if (retval == -1)
+ fprintf(stderr, "%s was not found in %s\n",
+ mc->m.mnt_dir, MOUNTSFILE);
+
+out:
+ fclose(f);
+ return retval;
+
+out_nfs4:
+ if (verbose)
+ fprintf(stderr, "NFSv4 mount point detected\n");
+ retval = 1;
+ goto out;
+
+out_nfs:
+ if (verbose)
+ fprintf(stderr, "Legacy NFS mount point detected\n");
+ retval = 0;
+ goto out;
+}
+
static struct option umount_longopts[] =
{
{ "force", 0, 0, 'f' },
@@ -364,13 +452,22 @@ int nfsumount(int argc, char *argv[])
ret = 0;
if (mc) {
- if (!lazy && strcmp(mc->m.mnt_type, "nfs4") != 0)
- /* We ignore the error from nfs_umount23.
- * If the actual umount succeeds (in del_mtab),
- * we don't want to signal an error, as that
- * could cause /sbin/mount to retry!
- */
- nfs_umount23(mc->m.mnt_fsname, mc->m.mnt_opts);
+ if (!lazy) {
+ switch (nfs_umount_is_vers4(mc)) {
+ case 0:
+ /* We ignore the error from nfs_umount23.
+ * If the actual umount succeeds (in del_mtab),
+ * we don't want to signal an error, as that
+ * could cause /sbin/mount to retry!
+ */
+ nfs_umount23(mc->m.mnt_fsname, mc->m.mnt_opts);
+ break;
+ case 1:
+ break;
+ default:
+ return EX_FAIL;
+ }
+ }
ret = del_mtab(mc->m.mnt_fsname, mc->m.mnt_dir) ?: ret;
} else if (*spec != '/') {
if (!lazy)
++++++ warn-nfs-udp.patch ++++++
--- /var/tmp/diff_new_pack.cf5B2p/_old 2010-10-11 16:57:43.000000000 +0200
+++ /var/tmp/diff_new_pack.cf5B2p/_new 2010-10-11 16:57:43.000000000 +0200
@@ -4,18 +4,18 @@
utils/mount/stropts.c | 13 +++++++
3 files changed, 99 insertions(+)
---- nfs-utils-1.2.1.orig/utils/mount/nfs.man
-+++ nfs-utils-1.2.1/utils/mount/nfs.man
-@@ -497,6 +497,8 @@ Specifying
- .B proto=udp
- forces all traffic types to use UDP.
+--- nfs-utils-1.2.3.orig/utils/mount/nfs.man
++++ nfs-utils-1.2.3/utils/mount/nfs.man
+@@ -504,6 +504,8 @@ Specifying a netid that uses TCP forces
+ command and the NFS client to use TCP.
+ Specifying a netid that uses UDP forces all traffic types to use UDP.
.IP
+.B Before using NFS over UDP, please refer to the section WARNINGS below.
+.IP
If the
.B proto
mount option is not specified, the
-@@ -511,6 +513,8 @@ The
+@@ -518,6 +520,8 @@ The
option is an alternative to specifying
.BR proto=udp.
It is included for compatibility with other operating systems.
@@ -24,7 +24,7 @@
.TP 1.5i
.B tcp
The
-@@ -896,6 +900,8 @@ in a single frame) is advised. This r
+@@ -932,6 +936,8 @@ in a single frame) is advised. This r
the loss of a single MTU-sized network frame results in the loss of
an entire large read or write request.
.P
@@ -33,7 +33,7 @@
TCP is the default transport protocol used for all modern NFS
implementations. It performs well in almost every conceivable
network environment and provides excellent guarantees against data
-@@ -1444,6 +1450,83 @@ of Access Control Lists that are semanti
+@@ -1480,6 +1486,83 @@ of Access Control Lists that are semanti
NFS version 4 ACLs are not fully compatible with POSIX ACLs; as such,
some translation between the two is required
in an environment that mixes POSIX ACLs and NFS version 4.
@@ -117,9 +117,9 @@
.SH FILES
.TP 1.5i
.I /etc/fstab
---- nfs-utils-1.2.1.orig/utils/mount/nfsmount.c
-+++ nfs-utils-1.2.1/utils/mount/nfsmount.c
-@@ -263,6 +263,9 @@ parse_options(char *old_opts, struct nfs
+--- nfs-utils-1.2.3.orig/utils/mount/nfsmount.c
++++ nfs-utils-1.2.3/utils/mount/nfsmount.c
+@@ -264,6 +264,9 @@ parse_options(char *old_opts, struct nfs
if (!strcmp(opteq+1, "udp")) {
nfs_pmap->pm_prot = IPPROTO_UDP;
mnt_pmap->pm_prot = IPPROTO_UDP;
@@ -129,9 +129,9 @@
#if NFS_MOUNT_VERSION >= 2
data->flags &= ~NFS_MOUNT_TCP;
} else if (!strcmp(opteq+1, "tcp") &&
---- nfs-utils-1.2.1.orig/utils/mount/stropts.c
-+++ nfs-utils-1.2.1/utils/mount/stropts.c
-@@ -530,11 +530,24 @@ static int nfs_sys_mount(struct nfsmount
+--- nfs-utils-1.2.3.orig/utils/mount/stropts.c
++++ nfs-utils-1.2.3/utils/mount/stropts.c
+@@ -569,11 +569,24 @@ static int nfs_sys_mount(struct nfsmount
{
char *options = NULL;
int result;
@@ -154,5 +154,5 @@
+ }
+
- if (verbose)
- printf(_("%s: trying text-based options '%s'\n"),
+ if (mi->fake)
+ return 1;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org