|
|
96dc52 |
autofs-5.1.7 - reduce umount EBUSY check delay
|
|
|
96dc52 |
|
|
|
96dc52 |
From: Ian Kent <raven@themaw.net>
|
|
|
96dc52 |
|
|
|
96dc52 |
Some time ago I had to wait and retry umount() for autofs mounts
|
|
|
96dc52 |
becuase I found EBUSY would be returned for a time after the call
|
|
|
96dc52 |
causing false negative umount returns.
|
|
|
96dc52 |
|
|
|
96dc52 |
I think that problem has been resolved but removing the retry is
|
|
|
96dc52 |
probably a little risky.
|
|
|
96dc52 |
|
|
|
96dc52 |
But the wait time is quite long at one fifth of a second so reduce
|
|
|
96dc52 |
that to one twentieth of a second and increase the retries to make
|
|
|
96dc52 |
it more resposive.
|
|
|
96dc52 |
|
|
|
96dc52 |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
96dc52 |
---
|
|
|
96dc52 |
CHANGELOG | 1 +
|
|
|
96dc52 |
daemon/direct.c | 4 ++--
|
|
|
96dc52 |
daemon/indirect.c | 2 +-
|
|
|
96dc52 |
include/automount.h | 2 +-
|
|
|
96dc52 |
4 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
96dc52 |
|
|
|
96dc52 |
diff --git a/CHANGELOG b/CHANGELOG
|
|
|
96dc52 |
index b144f6aa..6419052d 100644
|
|
|
96dc52 |
--- a/CHANGELOG
|
|
|
96dc52 |
+++ b/CHANGELOG
|
|
|
96dc52 |
@@ -23,6 +23,7 @@
|
|
|
96dc52 |
- eliminate count_mounts() from expire_proc_indirect().
|
|
|
96dc52 |
- eliminate some strlen calls in offset handling.
|
|
|
96dc52 |
- don't add offset mounts to mounted mounts table.
|
|
|
96dc52 |
+- reduce umount EBUSY check delay.
|
|
|
96dc52 |
|
|
|
96dc52 |
25/01/2021 autofs-5.1.7
|
|
|
96dc52 |
- make bind mounts propagation slave by default.
|
|
|
96dc52 |
diff --git a/daemon/direct.c b/daemon/direct.c
|
|
|
96dc52 |
index fbfebbdd..5c1146a7 100644
|
|
|
96dc52 |
--- a/daemon/direct.c
|
|
|
96dc52 |
+++ b/daemon/direct.c
|
|
|
96dc52 |
@@ -150,7 +150,7 @@ int do_umount_autofs_direct(struct autofs_point *ap, struct mapent *me)
|
|
|
96dc52 |
|
|
|
96dc52 |
retries = UMOUNT_RETRIES;
|
|
|
96dc52 |
while ((rv = umount(me->key)) == -1 && retries--) {
|
|
|
96dc52 |
- struct timespec tm = {0, 200000000};
|
|
|
96dc52 |
+ struct timespec tm = {0, 50000000};
|
|
|
96dc52 |
if (errno != EBUSY)
|
|
|
96dc52 |
break;
|
|
|
96dc52 |
nanosleep(&tm, NULL);
|
|
|
96dc52 |
@@ -573,7 +573,7 @@ int umount_autofs_offset(struct autofs_point *ap, struct mapent *me)
|
|
|
96dc52 |
|
|
|
96dc52 |
retries = UMOUNT_RETRIES;
|
|
|
96dc52 |
while ((rv = umount(me->key)) == -1 && retries--) {
|
|
|
96dc52 |
- struct timespec tm = {0, 200000000};
|
|
|
96dc52 |
+ struct timespec tm = {0, 50000000};
|
|
|
96dc52 |
if (errno != EBUSY)
|
|
|
96dc52 |
break;
|
|
|
96dc52 |
nanosleep(&tm, NULL);
|
|
|
96dc52 |
diff --git a/daemon/indirect.c b/daemon/indirect.c
|
|
|
96dc52 |
index eddcfff7..9f2ca6a0 100644
|
|
|
96dc52 |
--- a/daemon/indirect.c
|
|
|
96dc52 |
+++ b/daemon/indirect.c
|
|
|
96dc52 |
@@ -265,7 +265,7 @@ int umount_autofs_indirect(struct autofs_point *ap, const char *root)
|
|
|
96dc52 |
|
|
|
96dc52 |
retries = UMOUNT_RETRIES;
|
|
|
96dc52 |
while ((rv = umount(mountpoint)) == -1 && retries--) {
|
|
|
96dc52 |
- struct timespec tm = {0, 200000000};
|
|
|
96dc52 |
+ struct timespec tm = {0, 50000000};
|
|
|
96dc52 |
if (errno != EBUSY)
|
|
|
96dc52 |
break;
|
|
|
96dc52 |
nanosleep(&tm, NULL);
|
|
|
96dc52 |
diff --git a/include/automount.h b/include/automount.h
|
|
|
96dc52 |
index 69445b92..fa6f5d63 100644
|
|
|
96dc52 |
--- a/include/automount.h
|
|
|
96dc52 |
+++ b/include/automount.h
|
|
|
96dc52 |
@@ -140,7 +140,7 @@ struct autofs_point;
|
|
|
96dc52 |
#define NULL_MAP_HASHSIZE 64
|
|
|
96dc52 |
#define NEGATIVE_TIMEOUT 10
|
|
|
96dc52 |
#define POSITIVE_TIMEOUT 120
|
|
|
96dc52 |
-#define UMOUNT_RETRIES 8
|
|
|
96dc52 |
+#define UMOUNT_RETRIES 16
|
|
|
96dc52 |
#define EXPIRE_RETRIES 3
|
|
|
96dc52 |
|
|
|
96dc52 |
struct mapent_cache {
|