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