- update to release tar.

- fix to "@network" matching.
- patch to give up trying to update exports list while host is mounted.
- patch to check for fstab update and retry if not updated.
This commit is contained in:
ikent 2007-02-22 11:16:45 +00:00
parent f2f80e9d7f
commit 6ee1d8c21e
5 changed files with 113 additions and 27 deletions

View File

@ -1 +1,2 @@
autofs-5.0.1-rc3.tar.bz2
autofs-5.0.1.tar.bz2

View File

@ -0,0 +1,87 @@
diff --git a/daemon/spawn.c b/daemon/spawn.c
index 7f0a6e0..271d37e 100644
--- a/daemon/spawn.c
+++ b/daemon/spawn.c
@@ -34,6 +34,8 @@ static pthread_mutex_t spawn_mutex = PTHREAD_MUTEX_INITIALIZER;
#define SPAWN_OPT_LOCK 0x0001
#define SPAWN_OPT_ACCESS 0x0002
+#define MTAB_LOCK_RETRIES 3
+
inline void dump_core(void)
{
sigset_t segv;
@@ -267,6 +269,8 @@ int spawn_mount(logger *log, ...)
char prog[] = PATH_MOUNT;
char arg0[] = PATH_MOUNT;
unsigned int options;
+ unsigned int retries = MTAB_LOCK_RETRIES;
+ int ret;
/* If we use mount locking we can't validate the location */
#ifdef ENABLE_MOUNT_LOCKING
@@ -289,7 +293,14 @@ int spawn_mount(logger *log, ...)
while ((*p++ = va_arg(arg, char *)));
va_end(arg);
- return do_spawn(log, options, prog, (const char **) argv);
+ while (retries--) {
+ ret = do_spawn(log, options, prog, (const char **) argv);
+ if (ret & MTAB_NOTUPDATED)
+ continue;
+ break;
+ }
+
+ return ret;
}
/*
@@ -309,6 +320,8 @@ int spawn_bind_mount(logger *log, ...)
char arg0[] = PATH_MOUNT;
char bind[] = "--bind";
unsigned int options;
+ unsigned int retries = MTAB_LOCK_RETRIES;
+ int ret;
/* If we use mount locking we can't validate the location */
#ifdef ENABLE_MOUNT_LOCKING
@@ -332,7 +345,14 @@ int spawn_bind_mount(logger *log, ...)
while ((*p++ = va_arg(arg, char *)));
va_end(arg);
- return do_spawn(log, options, prog, (const char **) argv);
+ while (retries--) {
+ ret = do_spawn(log, options, prog, (const char **) argv);
+ if (ret & MTAB_NOTUPDATED)
+ continue;
+ break;
+ }
+
+ return ret;
}
int spawn_umount(logger *log, ...)
@@ -343,6 +363,8 @@ int spawn_umount(logger *log, ...)
char prog[] = PATH_UMOUNT;
char arg0[] = PATH_UMOUNT;
unsigned int options;
+ unsigned int retries = MTAB_LOCK_RETRIES;
+ int ret;
#ifdef ENABLE_MOUNT_LOCKING
options = SPAWN_OPT_LOCK;
@@ -364,6 +386,13 @@ int spawn_umount(logger *log, ...)
while ((*p++ = va_arg(arg, char *)));
va_end(arg);
- return do_spawn(log, options, prog, (const char **) argv);
+ while (retries--) {
+ ret = do_spawn(log, options, prog, (const char **) argv);
+ if (ret & MTAB_NOTUPDATED)
+ continue;
+ break;
+ }
+
+ return ret;
}

View File

@ -0,0 +1,13 @@
diff --git a/modules/lookup_hosts.c b/modules/lookup_hosts.c
index 1a16b96..8855ed7 100644
--- a/modules/lookup_hosts.c
+++ b/modules/lookup_hosts.c
@@ -189,7 +189,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
if (!ret)
return NSS_STATUS_SUCCESS;
- debug(ap->logopt, MODPREFIX "mount failed - update exports list");
+ return NSS_STATUS_TRYAGAIN;
}
done:
/*

View File

@ -4,26 +4,15 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.1
Release: 0.rc3.24
Release: 1
Epoch: 1
License: GPL
Group: System Environment/Daemons
URL: http://wiki.autofs.net/
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}-rc3.tar.bz2
Patch1: autofs-5.0.1-rc3-fix-typo-rmdir-temp.patch
Patch2: autofs-5.0.1-rc3-remove-rpath-link-option.patch
Patch3: autofs-5.0.1-rc3-nsswitch-ignore-winbind.patch
Patch4: autofs-5.0.1-rc3-correct-expire-check.patch
Patch5: autofs-5.0.1-rc3-correct-offset-mount-busy-check.patch
Patch6: autofs-5.0.1-rc3-consistent-dquote-handling.patch
Patch7: autofs-5.0.1-rc3-trailing-whitespace.patch
Patch8: autofs-5.0.1-rc3-match-export-fqdn.patch
Patch9: autofs-5.0.1-rc3-task-done-race-2.patch
Patch10: autofs-5.0.1-rc3-do_mkdir-return-status.patch
Patch11: autofs-5.0.1-rc3-proximity-local-handling.patch
Patch12: autofs-5.0.1-rc3-add-condrestart.patch
Patch13: autofs-5.0.1-rc3-export-match-at-network-and-dot-domain.patch
Patch14: autofs-5.0.1-rc3-hosts-map-name.patch
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2
Patch1: autofs-5.0.1-export-check-network-fix.patch
Patch2: autofs-5.0.1-hosts-simple-fail.patch
Patch3: autofs-5.0.1-check-mtab-updated.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel
Conflicts: kernel < 2.6.17
@ -68,17 +57,6 @@ echo %{version}-%{release} > .version
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@ -131,6 +109,12 @@ fi
%{_libdir}/autofs/
%changelog
* Thu Feb 22 2007 Ian Kent <ikent@redhat.com> - 5.0.1-1
- update to release tar.
- fix to "@network" matching.
- patch to give up trying to update exports list while host is mounted.
- patch to check for fstab update and retry if not updated.
* Tue Feb 20 2007 Ian Kent <ikent@redhat.com> - 5.0.1-0.rc3.24
- add "condrestart" to init script (bz 228860).
- add "@network" and .domain.name export check.

View File

@ -1 +1,2 @@
7cf64434fd19a56506fcd1f64034740c autofs-5.0.1-rc3.tar.bz2
f5a1d5e3611e8509f727a14391933dac autofs-5.0.1.tar.bz2