- fix Linux NFS recognition of umounts and add systemd dependency on nfs-lock.service.
This commit is contained in:
parent
900e37a07e
commit
813a963a82
39
am-utils-6.2-fix-Linux-NFS-recognition-of-umounts.patch
Normal file
39
am-utils-6.2-fix-Linux-NFS-recognition-of-umounts.patch
Normal file
@ -0,0 +1,39 @@
|
||||
am-utils-6.2 - fix Linux NFS recognition of umounts
|
||||
|
||||
From: Ian Kent <raven@themaw.net>
|
||||
|
||||
Recent Linux NFS uses a simulated attibute cache change detection
|
||||
method based on ctime. Consequenty the amd use of mtime for this
|
||||
doesn't work properly for some kernel versions.
|
||||
|
||||
The problem seen with some kernel versions is a failure to recognize
|
||||
umounts.
|
||||
|
||||
Updating the parent ctime in step with mtime during umount appears
|
||||
to fix the problem.
|
||||
|
||||
Signed-off-by: Ian Kent <raven@themaw.net>
|
||||
---
|
||||
amd/autil.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/amd/autil.c b/amd/autil.c
|
||||
index cd9514d..efd18ef 100644
|
||||
--- a/amd/autil.c
|
||||
+++ b/amd/autil.c
|
||||
@@ -709,10 +709,13 @@ am_unmounted(am_node *mp)
|
||||
--mp->am_parent->am_fattr.na_nlink;
|
||||
|
||||
/*
|
||||
- * Update mtime of parent node
|
||||
+ * Update mtime and ctime of parent node (as ctime is needed for some
|
||||
+ * Linux NFS kernel versions to properly recognize attribute changes).
|
||||
*/
|
||||
- if (mp->am_parent && mp->am_parent->am_al->al_mnt)
|
||||
+ if (mp->am_parent && mp->am_parent->am_al->al_mnt) {
|
||||
clocktime(&mp->am_parent->am_fattr.na_mtime);
|
||||
+ mp->am_parent->am_fattr.na_ctime = mp->am_parent->am_fattr.na_mtime;
|
||||
+ }
|
||||
|
||||
if (mp->am_parent && (mp->am_flags & AMF_REMOUNT)) {
|
||||
char *fname = xstrdup(mp->am_name);
|
@ -2,7 +2,7 @@ Summary: Automount utilities including an updated version of Amd
|
||||
Name: am-utils
|
||||
Version: 6.2.0
|
||||
%define upstream_version 6.2
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
License: BSD
|
||||
Epoch: 5
|
||||
Group: System Environment/Daemons
|
||||
@ -50,6 +50,8 @@ Patch4: am-utils-6.2-fix-NFSv3-lookup-dir-attribute-return-value.patch
|
||||
Patch5: am-utils-6.2-fix-NFSv3-readdir-post_op_dir-attributes-return.patch
|
||||
Patch6: am-utils-6.2-fix-NFSv3-unlink3_or_rmdir3-post_op-attributes-return.patch
|
||||
|
||||
Patch7: am-utils-6.2-fix-Linux-NFS-recognition-of-umounts.patch
|
||||
|
||||
# Not needed since autoreconf/libtool appear to do this automatically
|
||||
# Leaving it set doesn't appear to be a problem so leave it set in
|
||||
# case this changes.
|
||||
@ -79,6 +81,7 @@ mounting and unmounting filesystems.
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
./bootstrap
|
||||
|
||||
@ -190,6 +193,10 @@ fi
|
||||
%{_libdir}/libamu.so*
|
||||
|
||||
%changelog
|
||||
* Mon Feb 29 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-9
|
||||
- fix Linux NFS recognition of umounts.
|
||||
- add systemd dependency on nfs-lock.service.
|
||||
|
||||
* Tue Feb 2 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-8
|
||||
- fix systemd unit dependencies.
|
||||
- Update Requires: portmap to Requires: rpcbind.
|
||||
|
@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=automount daemon that mounts devices and NFS hosts on demand
|
||||
After=syslog.target network.target network-online.target rpcbind.service
|
||||
Wants=network-online.target rpcbind.service
|
||||
Wants=network-online.target rpcbind.service nfs-lock.service
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/amd
|
||||
|
Loading…
Reference in New Issue
Block a user