- nfs4-no-umount: does send MOUNT_UMNT rpcs
when unmounting an 'nfs4' filesystem. They are only required for nfs2,3. (bnc#772534) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=77
This commit is contained in:
parent
d28a12e2d8
commit
cb040c180b
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 27 02:10:53 UTC 2012 - nfbrown@suse.com
|
||||||
|
|
||||||
|
- nfs4-no-umount: does send MOUNT_UMNT rpcs
|
||||||
|
when unmounting an 'nfs4' filesystem. They
|
||||||
|
are only required for nfs2,3. (bnc#772534)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 19 06:26:10 UTC 2012 - nfbrown@suse.com
|
Thu Jul 19 06:26:10 UTC 2012 - nfbrown@suse.com
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ Patch0: nfs-utils-1.0.7-bind-syntax.patch
|
|||||||
Patch1: remove_pretty_sig.patch
|
Patch1: remove_pretty_sig.patch
|
||||||
Patch2: mkdir-sbin
|
Patch2: mkdir-sbin
|
||||||
Patch3: mount-exit-code.fix
|
Patch3: mount-exit-code.fix
|
||||||
|
Patch4: nfs4-no-umount
|
||||||
Suggests: python-base
|
Suggests: python-base
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -139,6 +140,7 @@ Authors:
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
cp %{S:6} .
|
cp %{S:6} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
49
nfs4-no-umount
Normal file
49
nfs4-no-umount
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From b0b342201140530c5b9e00408f12d22258df7c4e Mon Sep 17 00:00:00 2001
|
||||||
|
From: NeilBrown <neilb@suse.de>
|
||||||
|
Date: Mon, 6 Aug 2012 08:41:13 -0400
|
||||||
|
Subject: [PATCH] umount: use correct return value for is_vers4.
|
||||||
|
|
||||||
|
is_vers4 in mount_libmount.c is based on nfs_umount_is_vers4
|
||||||
|
in nfsumount.c, except the return values are reversed.
|
||||||
|
The result of this is:
|
||||||
|
- a MOUNT_UMNT call is not sent when an NFSv3 or NFSv2
|
||||||
|
filesystem is unmounted
|
||||||
|
- a MOUNT_UMNT call *is* sent when and 'nfs4' filesystem
|
||||||
|
is unmounted (but not when an 'nfs -o vers=4 filesystem
|
||||||
|
is unmounted, as that is checked elsewhere).
|
||||||
|
|
||||||
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||||
|
Signed-off-by: Steve Dickson <steved@redhat.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
utils/mount/mount_libmount.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- nfs-utils-1.2.6.orig/utils/mount/mount_libmount.c
|
||||||
|
+++ nfs-utils-1.2.6/utils/mount/mount_libmount.c
|
||||||
|
@@ -140,14 +140,14 @@ static int try_mount(struct libmnt_conte
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
-/* returns: error = -1, success = 0 , unknown = 1 */
|
||||||
|
+/* returns: error = -1, success = 1 , not vers4 == 0 */
|
||||||
|
static int is_vers4(struct libmnt_context *cxt)
|
||||||
|
{
|
||||||
|
struct libmnt_fs *fs = mnt_context_get_fs(cxt);
|
||||||
|
struct libmnt_table *tb = NULL;
|
||||||
|
const char *src = mnt_context_get_source(cxt),
|
||||||
|
*tgt = mnt_context_get_target(cxt);
|
||||||
|
- int rc = 1;
|
||||||
|
+ int rc = 0;
|
||||||
|
|
||||||
|
if (!src || !tgt)
|
||||||
|
return -1;
|
||||||
|
@@ -163,7 +163,7 @@ static int is_vers4(struct libmnt_contex
|
||||||
|
if (fs) {
|
||||||
|
const char *type = mnt_fs_get_fstype(fs);
|
||||||
|
if (type && strcmp(type, "nfs4") == 0)
|
||||||
|
- rc = 0;
|
||||||
|
+ rc = 1;
|
||||||
|
}
|
||||||
|
mnt_free_table(tb);
|
||||||
|
return rc;
|
Loading…
x
Reference in New Issue
Block a user