rpms/kernel/devel linux-2.6-nfs-client-mounts-hang.patch,1.1,1.2
Dave Jones (davej)
fedora-extras-commits at redhat.com
Sat Apr 12 16:49:08 UTC 2008
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25970
Modified Files:
linux-2.6-nfs-client-mounts-hang.patch
Log Message:
use the 2nd take of Steves patch
linux-2.6-nfs-client-mounts-hang.patch:
Index: linux-2.6-nfs-client-mounts-hang.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-nfs-client-mounts-hang.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-nfs-client-mounts-hang.patch 12 Apr 2008 16:46:48 -0000 1.1
+++ linux-2.6-nfs-client-mounts-hang.patch 12 Apr 2008 16:48:55 -0000 1.2
@@ -1,5 +1,5 @@
-From davej Fri Apr 11 11:23:51 2008
-Return-Path: <SteveD at redhat.com>
+From davej Fri Apr 11 20:06:57 2008
+Return-Path: <fedora-kernel-list-bounces at redhat.com>
X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on
quoit.install.boston.redhat.com
X-Spam-Level:
@@ -7,53 +7,63 @@
UNPARSEABLE_RELAY autolearn=ham version=3.2.4
Received: from pobox.devel.redhat.com [10.11.255.8]
by quoit.install.boston.redhat.com with IMAP (fetchmail-6.3.8)
- for <davej at localhost> (single-drop); Fri, 11 Apr 2008 11:23:51 -0400 (EDT)
+ for <davej at localhost> (single-drop); Fri, 11 Apr 2008 20:06:57 -0400 (EDT)
Received: from pobox.devel.redhat.com ([unix socket])
by pobox.devel.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-8.1.RHEL4) with LMTPA;
- Fri, 11 Apr 2008 11:23:04 -0400
+ Fri, 11 Apr 2008 20:03:31 -0400
X-Sieve: CMU Sieve 2.2
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
- by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id m3BFN4Vn004738
- for <davej at pobox.devel.redhat.com>; Fri, 11 Apr 2008 11:23:04 -0400
+ by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id m3C03VUw021673;
+ Fri, 11 Apr 2008 20:03:31 -0400
+Received: from mx1.util.phx.redhat.com (mx1.util.phx.redhat.com [10.8.4.92])
+ by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m3C03TPo021615;
+ Fri, 11 Apr 2008 20:03:30 -0400
+Received: from hormel.redhat.com (hormel1.util.phx.redhat.com [10.8.4.116])
+ by mx1.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id m3C03Oxg016566;
+ Fri, 11 Apr 2008 20:03:24 -0400
+Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110])
+ by hormel.redhat.com (Postfix) with ESMTP id 6D8876188FB;
+ Fri, 11 Apr 2008 20:03:24 -0400 (EDT)
+Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com
+ [172.16.52.254])
+ by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id
+ m3C03M0S023637 for <fedora-kernel-list at listman.util.phx.redhat.com>;
+ Fri, 11 Apr 2008 20:03:22 -0400
Received: from file.rdu.redhat.com (file.rdu.redhat.com [10.11.255.147])
- by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m3BFN3oE027502;
- Fri, 11 Apr 2008 11:23:03 -0400
-Received: from [10.13.248.55] (vpn-248-55.boston.redhat.com [10.13.248.55])
- by file.rdu.redhat.com (8.13.1/8.13.1) with ESMTP id m3BFN16w019076;
- Fri, 11 Apr 2008 11:23:02 -0400
-Message-ID: <47FF824B.9060508 at RedHat.com>
-Date: Fri, 11 Apr 2008 11:22:51 -0400
+ by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m3C03Mad021593;
+ Fri, 11 Apr 2008 20:03:22 -0400
+Received: from [10.13.248.64] (vpn-248-64.boston.redhat.com [10.13.248.64])
+ by file.rdu.redhat.com (8.13.1/8.13.1) with ESMTP id m3C03KPG005232;
+ Fri, 11 Apr 2008 20:03:21 -0400
+Message-ID: <47FFFC3A.2040708 at RedHat.com>
+Date: Fri, 11 Apr 2008 20:03:06 -0400
From: Steve Dickson <SteveD at redhat.com>
User-Agent: Thunderbird 2.0.0.12 (X11/20080226)
MIME-Version: 1.0
-To: Jesse Keating <jkeating at redhat.com>
-CC: Dave Jone <davej at redhat.com>
-Subject: [Fwd: [PATCH] NFS Client mounts hang when exported directory do not
- exist]
+To: Linux NFS Mailing list <linux-nfs at vger.kernel.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254
-Status: RO
-Content-Length: 3085
-Lines: 101
-
-Jesse, here is the patch thats needed to stop NFS installs
-from hanging... Unfortunately is not as simple as I
-thought it would be since I have t patch the kernel.
-
-Dave, this regression could cause some major pain,
-so you might want to consider taking this patch
-sooner verses later... As you can see, I've already purposed
-the patch to upstream and will let know how that works out.
-
-steved.
-
--------- Original Message --------
+X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254
+X-loop: fedora-kernel-list at redhat.com
+Cc: Fedora Kernel Mailing list <fedora-kernel-list at redhat.com>
Subject: [PATCH] NFS Client mounts hang when exported directory do not exist
-Date: Fri, 11 Apr 2008 11:12:12 -0400
-From: Steve Dickson <SteveD at redhat.com>
-To: Linux NFS Mailing list <linux-nfs at vger.kernel.org>
-CC: Fedora Kernel Mailing list <fedora-kernel-list at redhat.com>
+X-BeenThere: fedora-kernel-list at redhat.com
+X-Mailman-Version: 2.1.5
+Precedence: junk
+List-Id: "Fedora kernel development." <fedora-kernel-list.redhat.com>
+List-Unsubscribe: <https://www.redhat.com/mailman/listinfo/fedora-kernel-list>,
+ <mailto:fedora-kernel-list-request at redhat.com?subject=unsubscribe>
+List-Archive: <https://www.redhat.com/archives/fedora-kernel-list>
+List-Post: <mailto:fedora-kernel-list at redhat.com>
+List-Help: <mailto:fedora-kernel-list-request at redhat.com?subject=help>
+List-Subscribe: <https://www.redhat.com/mailman/listinfo/fedora-kernel-list>,
+ <mailto:fedora-kernel-list-request at redhat.com?subject=subscribe>
+Sender: fedora-kernel-list-bounces at redhat.com
+Errors-To: fedora-kernel-list-bounces at redhat.com
+Status: RO
+Content-Length: 1546
+Lines: 43
This patch fixes a regression that was introduced by the string based mounts.
@@ -70,69 +80,29 @@
Signed-off-by: Steve Dickson <steved at redhat.com>
---
+Take 2- Why reinvent the wheel, as Trond pointed out using
+nfs_stat_to_errno() makes more sense and is makes things much
+similar, something I'm always a fan of...
diff -up linux/fs/nfs/mount_clnt.c.orig linux/fs/nfs/mount_clnt.c
--- linux/fs/nfs/mount_clnt.c.orig 2008-04-09 08:32:43.000000000 -0400
-+++ linux/fs/nfs/mount_clnt.c 2008-04-11 11:01:39.000000000 -0400
-@@ -21,6 +21,49 @@
-
- static struct rpc_program mnt_program;
++++ linux/fs/nfs/mount_clnt.c 2008-04-11 19:42:16.000000000 -0400
+@@ -14,6 +14,7 @@
+ #include <linux/sunrpc/clnt.h>
+ #include <linux/sunrpc/sched.h>
+ #include <linux/nfs_fs.h>
++#include "internal.h"
-+static struct {
-+ enum nfs_stat stat;
-+ int errnum;
-+} mnt_errtbl[] = {
-+ { NFS_OK, 0 },
-+ { NFSERR_PERM, EPERM },
-+ { NFSERR_NOENT, ENOENT },
-+ { NFSERR_IO, EIO },
-+ { NFSERR_NXIO, ENXIO },
-+ { NFSERR_ACCES, EACCES },
-+ { NFSERR_EXIST, EEXIST },
-+ { NFSERR_NODEV, ENODEV },
-+ { NFSERR_NOTDIR, ENOTDIR },
-+ { NFSERR_ISDIR, EISDIR },
-+#ifdef NFSERR_INVAL
-+ { NFSERR_INVAL, EINVAL }, /* that Sun forgot */
-+#endif
-+ { NFSERR_FBIG, EFBIG },
-+ { NFSERR_NOSPC, ENOSPC },
-+ { NFSERR_ROFS, EROFS },
-+ { NFSERR_NAMETOOLONG, ENAMETOOLONG },
-+ { NFSERR_NOTEMPTY, ENOTEMPTY },
-+ { NFSERR_DQUOT, EDQUOT },
-+ { NFSERR_STALE, ESTALE },
-+#ifdef EWFLUSH
-+ { NFSERR_WFLUSH, EWFLUSH },
-+#endif
-+ /* Throw in some NFSv3 values for even more fun (HP returns these) */
-+ { 71, EREMOTE },
-+};
-+static int mnt_errtbl_sz = sizeof(mnt_errtbl)/sizeof(mnt_errtbl[0]);
-+
-+static inline int mnt_err_map(int stat)
-+{
-+ int i;
-+
-+ for (i = 0; i < mnt_errtbl_sz; i++) {
-+ if (mnt_errtbl[i].stat == stat)
-+ return -mnt_errtbl[i].errnum;
-+ }
-+ return -EACCES;
-+}
-+
- struct mnt_fhstatus {
- u32 status;
- struct nfs_fh *fh;
-@@ -98,7 +141,7 @@ out_call_err:
+ #ifdef RPC_DEBUG
+ # define NFSDBG_FACILITY NFSDBG_MOUNT
+@@ -98,7 +99,7 @@ out_call_err:
out_mnt_err:
dprintk("NFS: MNT server returned result %d\n", result.status);
- status = -EACCES;
-+ status = mnt_err_map(result.status);
++ status = -nfs_stat_to_errno(result.status);
goto out;
}
-
_______________________________________________
Fedora-kernel-list mailing list
More information about the scm-commits
mailing list