From 1919c1cc488033e2bf2b031e7df4ed152fe526714c4ba765916306cf0e7a03ca Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 17 Feb 2016 03:22:25 +0000 Subject: [PATCH 1/2] - nfs.service: don't mount/unmount nfs filesystems. systemd does this automatically. Trying to do it here too causes timing races (boo#963616) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=154 --- nfs-utils.changes | 7 +++++++ nfs-utils.spec | 2 +- nfs.service | 2 -- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nfs-utils.changes b/nfs-utils.changes index 41e4285..e37562d 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 17 03:20:55 UTC 2016 - neilb@suse.com + +- nfs.service: don't mount/unmount nfs filesystems. + systemd does this automatically. Trying to do it here too + causes timing races (boo#963616) + ------------------------------------------------------------------- Thu Nov 26 16:17:42 UTC 2015 - schwab@suse.de diff --git a/nfs-utils.spec b/nfs-utils.spec index dfb7564..50a0158 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,7 +1,7 @@ # # spec file for package nfs-utils # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/nfs.service b/nfs.service index c843439..ad879f7 100644 --- a/nfs.service +++ b/nfs.service @@ -17,8 +17,6 @@ PropagatesReloadTo=nfs-client.target Type=oneshot RemainAfterExit=yes ExecStart=/bin/true -ExecStartPost=/usr/bin/mount -at nfs,nfs4 -ExecStop=/usr/bin/umount -aft nfs,nfs4 [Install] WantedBy=multi-user.target From f26279da732e7a035960aa05ab5de07ed9cf15be5cf1e374799cf486fc6946a3 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 18 Feb 2016 06:04:53 +0000 Subject: [PATCH 2/2] - 0001-Fix-protocol-minor-version-fall-back.patch (bnc#959211) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=155 --- ...Fix-protocol-minor-version-fall-back.patch | 49 +++++++++++++++++++ nfs-utils.changes | 6 +++ nfs-utils.spec | 2 + 3 files changed, 57 insertions(+) create mode 100644 0001-Fix-protocol-minor-version-fall-back.patch diff --git a/0001-Fix-protocol-minor-version-fall-back.patch b/0001-Fix-protocol-minor-version-fall-back.patch new file mode 100644 index 0000000..d2f4b83 --- /dev/null +++ b/0001-Fix-protocol-minor-version-fall-back.patch @@ -0,0 +1,49 @@ +From 78bb645a42c216b37b8d930c7c849a3fa89babf8 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sat, 16 Jan 2016 12:02:30 -0500 +Subject: [PATCH] Fix protocol minor version fall-back + +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. +In kernels since 3.11 this can happen in nfs4_alloc_client(), if +compiled without NFS_V4_2. + +More generally it can happen in in nfs_validate_text_mount_data() +when nfs_parse_mount_options() returns 0 because +nfs_parse_version_string() +didn't recognise the version. + +EPROTONOSUPPORT is only returned if NFSv4 support is completely compiled +out. + +So nfs_autonegotiate needs to check for EINVAL as well as +EPROTONOSUPPORT. + +URL: https://bugzilla.opensuse.org/show_bug.cgi?id=959211 +Reported-by: Takashi Iwai +Signed-off-by: NeilBrown +Signed-off-by: Steve Dickson +--- + utils/mount/stropts.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c +index c8f5a6d223e7..86829a902bfd 100644 +--- a/utils/mount/stropts.c ++++ b/utils/mount/stropts.c +@@ -841,6 +841,9 @@ check_result: + case EPROTONOSUPPORT: + /* A clear indication that the server or our + * client does not support NFS version 4 and minor */ ++ case EINVAL: ++ /* A less clear indication that our client ++ * does not support NFSv4 minor version. */ + if (mi->version.v_mode == V_GENERAL && + mi->version.minor == 0) + return result; +-- +2.7.1 + diff --git a/nfs-utils.changes b/nfs-utils.changes index e37562d..df778c0 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 18 06:04:05 UTC 2016 - neilb@suse.com + +- 0001-Fix-protocol-minor-version-fall-back.patch + (bnc#959211) + ------------------------------------------------------------------- Wed Feb 17 03:20:55 UTC 2016 - neilb@suse.com diff --git a/nfs-utils.spec b/nfs-utils.spec index 50a0158..91f6400 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -63,6 +63,7 @@ Source18: nfs-client.nfs.conf Patch0: nfs-utils-1.0.7-bind-syntax.patch Patch1: nfs-utils-no-svcgss.service Patch2: nfs-utils-uninit-mem.patch +Patch3: 0001-Fix-protocol-minor-version-fall-back.patch Suggests: python-base %description @@ -115,6 +116,7 @@ This package contains additional NFS documentation. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 cp %{S:6} . %build