is already mounted results in the mount point not being
removed when it times out. (Amd considers it an error
mntfs and thus umount becomse a no-op.)
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
2009-12-10 Christos Zoulas <christos@zoulas.com>
+ * Setting the error flag of the mntfs for which the share
+ is already mounted results in the mount point not being
+ removed when it times out. (Amd considers it an error
+ mntfs and thus umount becomse a no-op.)
+ From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
+
* Right now AMD sets all timeout values to their defaults
even if you explicitly set them to zero. This patch
introduces separate flags that store if the respective
return -1;
failed:
- amd_stats.d_merr++;
- mf->mf_error = this_error;
- mf->mf_flags |= MFF_ERROR;
+ if (!FSRV_ISDOWN(mf->mf_server)) {
+ /* mark the mount as failed unless the server is down */
+ amd_stats.d_merr++;
+ mf->mf_error = this_error;
+ mf->mf_flags |= MFF_ERROR;
#ifdef HAVE_FS_AUTOFS
- if (mp->am_autofs_fh)
- autofs_release_fh(mp);
+ if (mp->am_autofs_fh)
+ autofs_release_fh(mp);
#endif /* HAVE_FS_AUTOFS */
- if (mf->mf_flags & MFF_MKMNT) {
- rmdirs(mf->mf_mount);
- mf->mf_flags &= ~MFF_MKMNT;
+ if (mf->mf_flags & MFF_MKMNT) {
+ rmdirs(mf->mf_mount);
+ mf->mf_flags &= ~MFF_MKMNT;
+ }
}
/*
* Wakeup anything waiting for this mount