|
Ian Kent |
e6cf32 |
diff -up autofs-5.0.3/daemon/direct.c.expire-works-too-hard autofs-5.0.3/daemon/direct.c
|
|
Ian Kent |
e6cf32 |
--- autofs-5.0.3/daemon/direct.c.expire-works-too-hard 2008-01-14 13:39:16.000000000 +0900
|
|
Ian Kent |
e6cf32 |
+++ autofs-5.0.3/daemon/direct.c 2008-02-25 08:48:08.000000000 +0900
|
|
Ian Kent |
e6cf32 |
@@ -808,7 +808,7 @@ static int expire_direct(int ioctlfd, co
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
if (fstat(ioctlfd, &st) == -1) {
|
|
Ian Kent |
e6cf32 |
char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
|
|
Ian Kent |
e6cf32 |
- error(logopt, "fstat failed: %s", estr);
|
|
Ian Kent |
e6cf32 |
+ debug(logopt, "fstat failed: %s", estr);
|
|
Ian Kent |
e6cf32 |
return 0;
|
|
Ian Kent |
e6cf32 |
}
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
@@ -824,11 +824,16 @@ static int expire_direct(int ioctlfd, co
|
|
Ian Kent |
e6cf32 |
if (errno == EBADF || errno == EINVAL)
|
|
Ian Kent |
e6cf32 |
return 1;
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
- /* Other than need to wait for the kernel ? */
|
|
Ian Kent |
e6cf32 |
- if (errno != EAGAIN)
|
|
Ian Kent |
e6cf32 |
- return 0;
|
|
Ian Kent |
e6cf32 |
+ /*
|
|
Ian Kent |
e6cf32 |
+ * Other than EAGAIN is an expire error so continue.
|
|
Ian Kent |
e6cf32 |
+ * Kernel try the same mount again, limited by
|
|
Ian Kent |
e6cf32 |
+ * retries (ie. number of mounts directly under
|
|
Ian Kent |
e6cf32 |
+ * mount point, should always be one for direct
|
|
Ian Kent |
e6cf32 |
+ * mounts).
|
|
Ian Kent |
e6cf32 |
+ */
|
|
Ian Kent |
e6cf32 |
+ if (errno == EAGAIN)
|
|
Ian Kent |
e6cf32 |
+ break;
|
|
Ian Kent |
e6cf32 |
}
|
|
Ian Kent |
e6cf32 |
-
|
|
Ian Kent |
e6cf32 |
nanosleep(&tm, NULL);
|
|
Ian Kent |
e6cf32 |
}
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
diff -up autofs-5.0.3/daemon/indirect.c.expire-works-too-hard autofs-5.0.3/daemon/indirect.c
|
|
Ian Kent |
e6cf32 |
--- autofs-5.0.3/daemon/indirect.c.expire-works-too-hard 2008-01-14 13:39:16.000000000 +0900
|
|
Ian Kent |
e6cf32 |
+++ autofs-5.0.3/daemon/indirect.c 2008-02-25 08:48:53.000000000 +0900
|
|
Ian Kent |
e6cf32 |
@@ -328,7 +328,7 @@ static int expire_indirect(struct autofs
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
if (fstat(ioctlfd, &st) == -1) {
|
|
Ian Kent |
e6cf32 |
char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
|
|
Ian Kent |
e6cf32 |
- error(ap->logopt, "fstat failed: %s", estr);
|
|
Ian Kent |
e6cf32 |
+ debug(ap->logopt, "fstat failed: %s", estr);
|
|
Ian Kent |
e6cf32 |
return 0;
|
|
Ian Kent |
e6cf32 |
}
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
@@ -344,11 +344,13 @@ static int expire_indirect(struct autofs
|
|
Ian Kent |
e6cf32 |
if (errno == EBADF || errno == EINVAL)
|
|
Ian Kent |
e6cf32 |
return 1;
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
- /* Other than need to wait for the kernel ? */
|
|
Ian Kent |
e6cf32 |
- if (errno != EAGAIN)
|
|
Ian Kent |
e6cf32 |
- return 0;
|
|
Ian Kent |
e6cf32 |
+ /*
|
|
Ian Kent |
e6cf32 |
+ * Other than EAGAIN is an expire error so continue.
|
|
Ian Kent |
e6cf32 |
+ * Kernel will try the next mount.
|
|
Ian Kent |
e6cf32 |
+ */
|
|
Ian Kent |
e6cf32 |
+ if (errno == EAGAIN)
|
|
Ian Kent |
e6cf32 |
+ break;
|
|
Ian Kent |
e6cf32 |
}
|
|
Ian Kent |
e6cf32 |
-
|
|
Ian Kent |
e6cf32 |
nanosleep(&tm, NULL);
|
|
Ian Kent |
e6cf32 |
}
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
diff -up autofs-5.0.3/CHANGELOG.expire-works-too-hard autofs-5.0.3/CHANGELOG
|
|
Ian Kent |
e6cf32 |
--- autofs-5.0.3/CHANGELOG.expire-works-too-hard 2008-02-25 08:44:54.000000000 +0900
|
|
Ian Kent |
e6cf32 |
+++ autofs-5.0.3/CHANGELOG 2008-02-25 08:48:08.000000000 +0900
|
|
Ian Kent |
e6cf32 |
@@ -6,6 +6,7 @@
|
|
Ian Kent |
e6cf32 |
- avoid using UDP for probing NFSv4 mount requests.
|
|
Ian Kent |
e6cf32 |
- use libldap instead of libldap_r (Guillaume Rousse).
|
|
Ian Kent |
e6cf32 |
- another fix for don't fail on empty master map.
|
|
Ian Kent |
e6cf32 |
+- fix expire working harder than needed.
|
|
Ian Kent |
e6cf32 |
|
|
Ian Kent |
e6cf32 |
14/01/2008 autofs-5.0.3
|
|
Ian Kent |
e6cf32 |
-----------------------
|