summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/nfs-utils/nfs-utils
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2016-11-16 18:07:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-23 11:10:14 +0000
commit19b5218696d15412837206ef507f930df2fed638 (patch)
tree3b20488c02747672e594b11c4d18255f6bfc763d /meta/recipes-connectivity/nfs-utils/nfs-utils
parent25078834f701fca21399a3c64c3a9720ada30858 (diff)
downloadpoky-19b5218696d15412837206ef507f930df2fed638.tar.gz
nfs-utils: fix protocol minor version fall-back
Mount nfs directory would fail if no specific nfsvers: mount -t nfs IP:/foo/bar/ /mnt/ mount.nfs: an incorrect mount option was specified mount.nfs currently expects mount(2) to fail with EPROTONOSUPPORT if the kernel doesn't understand the requested NFS version. Unfortunately if the requested minor is not known to the kernel it returns -EINVAL. Backport patch from nfs-utils-1.3.4 to fix this issue. (From OE-Core rev: 332596628697d28ae6e8c2271c9658aaf5e54796) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/nfs-utils/nfs-utils')
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch
new file mode 100644
index 0000000000..683246c4a4
--- /dev/null
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/fix-protocol-minor-version-fall-back.patch
@@ -0,0 +1,55 @@
1From 78bb645a42c216b37b8d930c7c849a3fa89babf8 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.com>
3Date: Sat, 16 Jan 2016 12:02:30 -0500
4Subject: [PATCH] Fix protocol minor version fall-back
5
6mount.nfs currently expects mount(2) to fail with EPROTONOSUPPORT if
7the kernel doesn't understand the requested NFS version.
8
9Unfortunately if the requested minor is not known to the kernel
10it returns -EINVAL.
11In kernels since 3.11 this can happen in nfs4_alloc_client(), if
12compiled without NFS_V4_2.
13
14More generally it can happen in in nfs_validate_text_mount_data()
15when nfs_parse_mount_options() returns 0 because
16nfs_parse_version_string()
17didn't recognise the version.
18
19EPROTONOSUPPORT is only returned if NFSv4 support is completely compiled
20out.
21
22So nfs_autonegotiate needs to check for EINVAL as well as
23EPROTONOSUPPORT.
24
25URL: https://bugzilla.opensuse.org/show_bug.cgi?id=959211
26Reported-by: Takashi Iwai <tiwai@suse.com>
27Signed-off-by: NeilBrown <neilb@suse.com>
28Signed-off-by: Steve Dickson <steved@redhat.com>
29
30
31Upstream-Status: Backport
32http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=patch;h=78bb645a42c216b37b8d930c7c849a3fa89babf8
33
34Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
35---
36 utils/mount/stropts.c | 3 +++
37 1 file changed, 3 insertions(+)
38
39diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
40index c8f5a6d..86829a9 100644
41--- a/utils/mount/stropts.c
42+++ b/utils/mount/stropts.c
43@@ -841,6 +841,9 @@ check_result:
44 case EPROTONOSUPPORT:
45 /* A clear indication that the server or our
46 * client does not support NFS version 4 and minor */
47+ case EINVAL:
48+ /* A less clear indication that our client
49+ * does not support NFSv4 minor version. */
50 if (mi->version.v_mode == V_GENERAL &&
51 mi->version.minor == 0)
52 return result;
53--
542.7.4
55