Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1973843 Details for
Bug 2213267
filesystems mount and expire immediately
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh89 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch - fix expire retry looping
autofs-5.1.8-fix-expire-retry-looping.patch (text/plain), 3.15 KB, created by
Ian Kent
on 2023-07-03 08:25:45 UTC
(
hide
)
Description:
Patch - fix expire retry looping
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2023-07-03 08:25:45 UTC
Size:
3.15 KB
patch
obsolete
>autofs-5.1.8 - fix expire retry looping > >From: Ian Kent <raven@themaw.net> > >Commit aa6da48d1 (autofs-5.1.7 - eliminate count_mounts() from >expire_proc_indirect()) stopped using the count_mounts() function >in indirect mount expires because it can be a significant overhead >and shouldn't be needed if the kernel expire dentry selection works >as it should. > >Unfortunately there is a case where it doesn't work properly, when >a USR1 signal is sent to the automount process it is meant to expire >mounts regardless of the expire timeout. In this case if a mount has >been propagated to a mount namespace and is held busy the mount will >fail to umount and because setting the last used field of the mount >dentry doesn't prevent the mount dentry from being selected for expire >again immediately in this case automount will look continually. > >The problem occurs because the the kernel doesn't know how to check >these propagated mounts for busyness and the init namespace automount >process tries to expire the mount but fails and continues trying to >expire the mount because the expire function assumes only mounts that >are not busy will be selected for expire. > >Signed-off-by: Ian Kent <raven@themaw.net> >--- > CHANGELOG | 1 + > daemon/indirect.c | 13 ++++++++++++- > include/automount.h | 2 +- > 3 files changed, 14 insertions(+), 2 deletions(-) > >diff --git a/CHANGELOG b/CHANGELOG >index a2b59eac..00c3278a 100644 >--- a/CHANGELOG >+++ b/CHANGELOG >@@ -92,6 +92,7 @@ > - make open files limit configurable. > - fix some sss error return cases. > - fix incorrect matching of cached wildcard key. >+- fix expire retry looping. > > 19/10/2021 autofs-5.1.8 > - add xdr_exports(). >diff --git a/daemon/indirect.c b/daemon/indirect.c >index 204fa076..0f7b620b 100644 >--- a/daemon/indirect.c >+++ b/daemon/indirect.c >@@ -343,6 +343,7 @@ void *expire_proc_indirect(void *arg) > int offsets, submnts, count; > int ioctlfd, cur_state; > int status, ret, left; >+ int retries; > > ea = (struct expire_args *) arg; > >@@ -490,9 +491,19 @@ void *expire_proc_indirect(void *arg) > * If there are no more real mounts left we could still > * have some offset mounts with no '/' offset or symlinks > * so we need to umount or unlink them here. >+ * >+ * The dentry info last_used field is set to 'now' when a >+ * dentry is selected for expire so that it isn't immediately >+ * selected again if the expire fails. But this can't work >+ * for immediate expires so the count_mounts() function must >+ * be used to limit the number of expire iterations. > */ > pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state); >- while (1) { >+ if (how == AUTOFS_EXP_IMMEDIATE) >+ retries = count_mounts(ap, ap->path, ap->dev); >+ else >+ retries = -1; >+ while (retries--) { > ret = ops->expire(ap->logopt, ap->ioctlfd, ap->path, how); > if (ret != 0 && errno == EAGAIN) > break; >diff --git a/include/automount.h b/include/automount.h >index 77ff0c70..9548db83 100644 >--- a/include/automount.h >+++ b/include/automount.h >@@ -146,7 +146,7 @@ struct autofs_point; > #define NEGATIVE_TIMEOUT 10 > #define POSITIVE_TIMEOUT 120 > #define UMOUNT_RETRIES 16 >-#define EXPIRE_RETRIES 3 >+#define EXPIRE_RETRIES 1 > > struct mapent_cache { > pthread_rwlock_t rwlock;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2213267
: 1973843