@@ -921,6 +921,14 @@ static int nfsmount_fg(struct nfsmount_info *mi)
*/
static int nfsmount_parent(struct nfsmount_info *mi)
{
+ po_return_t retrans, timeo;
+
+ if (po_contains(mi->options, "retrans") == PO_NOT_FOUND)
+ retrans = po_append(mi->options, "retrans=1");
+
+ if (po_contains(mi->options, "timeo") == PO_NOT_FOUND)
+ timeo = po_append(mi->options, "timeo=100"); /* ~25 secs */
+
if (nfs_try_mount(mi))
return EX_SUCCESS;
@@ -929,6 +937,10 @@ static int nfsmount_parent(struct nfsmount_info *mi)
mount_error(mi->spec, mi->node, errno);
return EX_FAIL;
}
+ if (retrans == PO_SUCCEEDED)
+ po_remove_all(mi->options, "retrans");
+ if (timeo == PO_SUCCEEDED)
+ po_remove_all(mi->options, "timeo");
sys_mount_errors(mi->hostname, errno, 1, 1);
return EX_BG;
With a proposed kernel fixed, the parent mounts of background mounts do not time out for over 5 mins. This patch will append "retrans=1,timeo=100" to the mount options (when they don't exist) causing the parent mount to time out in ~25secs The options are then removed (if they were added) before the child mount, in background, is done Signed-off-by: Steve Dickson <steved@redhat.com> --- utils/mount/stropts.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)