|
|
9a499a |
autofs-5.1.7 - reduce umount EBUSY check delay
|
|
|
9a499a |
|
|
|
9a499a |
From: Ian Kent <raven@themaw.net>
|
|
|
9a499a |
|
|
|
9a499a |
Some time ago I had to wait and retry umount() for autofs mounts
|
|
|
9a499a |
becuase I found EBUSY would be returned for a time after the call
|
|
|
9a499a |
causing false negative umount returns.
|
|
|
9a499a |
|
|
|
9a499a |
I think that problem has been resolved but removing the retry is
|
|
|
9a499a |
probably a little risky.
|
|
|
9a499a |
|
|
|
9a499a |
But the wait time is quite long at one fifth of a second so reduce
|
|
|
9a499a |
that to one twentieth of a second and increase the retries to make
|
|
|
9a499a |
it more resposive.
|
|
|
9a499a |
|
|
|
9a499a |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
9a499a |
---
|
|
|
9a499a |
CHANGELOG | 1 +
|
|
|
9a499a |
daemon/direct.c | 4 ++--
|
|
|
9a499a |
daemon/indirect.c | 2 +-
|
|
|
9a499a |
include/automount.h | 2 +-
|
|
|
9a499a |
4 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
9a499a |
|
|
|
9a499a |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
9a499a |
+++ autofs-5.1.4/CHANGELOG
|
|
|
9a499a |
@@ -22,6 +22,7 @@
|
|
|
9a499a |
- eliminate count_mounts() from expire_proc_indirect().
|
|
|
9a499a |
- eliminate some strlen calls in offset handling.
|
|
|
9a499a |
- don't add offset mounts to mounted mounts table.
|
|
|
9a499a |
+- reduce umount EBUSY check delay.
|
|
|
9a499a |
|
|
|
9a499a |
xx/xx/2018 autofs-5.1.5
|
|
|
9a499a |
- fix flag file permission.
|
|
|
9a499a |
--- autofs-5.1.4.orig/daemon/direct.c
|
|
|
9a499a |
+++ autofs-5.1.4/daemon/direct.c
|
|
|
9a499a |
@@ -150,7 +150,7 @@ int do_umount_autofs_direct(struct autof
|
|
|
9a499a |
|
|
|
9a499a |
retries = UMOUNT_RETRIES;
|
|
|
9a499a |
while ((rv = umount(me->key)) == -1 && retries--) {
|
|
|
9a499a |
- struct timespec tm = {0, 200000000};
|
|
|
9a499a |
+ struct timespec tm = {0, 50000000};
|
|
|
9a499a |
if (errno != EBUSY)
|
|
|
9a499a |
break;
|
|
|
9a499a |
nanosleep(&tm, NULL);
|
|
|
9a499a |
@@ -573,7 +573,7 @@ int umount_autofs_offset(struct autofs_p
|
|
|
9a499a |
|
|
|
9a499a |
retries = UMOUNT_RETRIES;
|
|
|
9a499a |
while ((rv = umount(me->key)) == -1 && retries--) {
|
|
|
9a499a |
- struct timespec tm = {0, 200000000};
|
|
|
9a499a |
+ struct timespec tm = {0, 50000000};
|
|
|
9a499a |
if (errno != EBUSY)
|
|
|
9a499a |
break;
|
|
|
9a499a |
nanosleep(&tm, NULL);
|
|
|
9a499a |
--- autofs-5.1.4.orig/daemon/indirect.c
|
|
|
9a499a |
+++ autofs-5.1.4/daemon/indirect.c
|
|
|
9a499a |
@@ -265,7 +265,7 @@ int umount_autofs_indirect(struct autofs
|
|
|
9a499a |
|
|
|
9a499a |
retries = UMOUNT_RETRIES;
|
|
|
9a499a |
while ((rv = umount(mountpoint)) == -1 && retries--) {
|
|
|
9a499a |
- struct timespec tm = {0, 200000000};
|
|
|
9a499a |
+ struct timespec tm = {0, 50000000};
|
|
|
9a499a |
if (errno != EBUSY)
|
|
|
9a499a |
break;
|
|
|
9a499a |
nanosleep(&tm, NULL);
|
|
|
9a499a |
--- autofs-5.1.4.orig/include/automount.h
|
|
|
9a499a |
+++ autofs-5.1.4/include/automount.h
|
|
|
9a499a |
@@ -140,7 +140,7 @@ struct autofs_point;
|
|
|
9a499a |
#define NULL_MAP_HASHSIZE 64
|
|
|
9a499a |
#define NEGATIVE_TIMEOUT 10
|
|
|
9a499a |
#define POSITIVE_TIMEOUT 120
|
|
|
9a499a |
-#define UMOUNT_RETRIES 8
|
|
|
9a499a |
+#define UMOUNT_RETRIES 16
|
|
|
9a499a |
#define EXPIRE_RETRIES 3
|
|
|
9a499a |
|
|
|
9a499a |
struct mapent_cache {
|