+2005-08-02 Erez Zadok <ezk@cs.sunysb.edu>
+
+ * amd/mntfs.c (free_mntfs): don't discard the last reference to an
+ mntfs that had been mounted already. It won't have the
+ MFF_RESTARTED flag on, as it gets turned off after the entry is
+ mounted, but it will have the MFF_RSTKEEP flag on.
+
+ * amd/autil.c (mf_mounted), amd/restart.c (restart_fake_mntfs):
+ show the mntfs's flags.
+
2005-08-01 Erez Zadok <ezk@cs.sunysb.edu>
* conf/mtab/mtab_linux.c: removed unused code. Cleanup.
* aix4 clean build.
* use strlcat/snprintf in a few places for safety.
* recover from IP address change of a down NFS server
+ * don't discard restarted mntfs that was used.
*** Notes specific to am-utils version 6.1
* SUCH DAMAGE.
*
*
- * $Id: autil.c,v 1.52 2005/07/20 03:32:30 ezk Exp $
+ * $Id: autil.c,v 1.53 2005/08/02 22:48:28 ezk Exp $
*
*/
}
if (mf->mf_flags & MFF_RESTART) {
- dlog("Restarted filesystem %s", mf->mf_mount);
mf->mf_flags &= ~MFF_RESTART;
+ dlog("Restarted filesystem %s, flags 0x%x", mf->mf_mount, mf->mf_flags);
}
/*
* SUCH DAMAGE.
*
*
- * $Id: mntfs.c,v 1.36 2005/01/18 03:01:24 ib42 Exp $
+ * $Id: mntfs.c,v 1.37 2005/08/02 22:48:28 ezk Exp $
*
*/
* a non-positive refcount. Something is badly wrong if
* we have been! Ignore the request for now...
*/
- if(mf->mf_refc <= 0) {
- plog(XLOG_ERROR, "IGNORING free_mntfs for <%s>: refc %d, flags %x",
+ if (mf->mf_refc <= 0) {
+ plog(XLOG_ERROR, "IGNORING free_mntfs for <%s>: refc %d, flags %x (bug?)",
+ mf->mf_mount, mf->mf_refc, mf->mf_flags);
+ return;
+ }
+
+ /* don't discard last reference of a restarted/kept mntfs */
+ if (mf->mf_refc == 1 && mf->mf_flags & MFF_RSTKEEP) {
+ plog(XLOG_ERROR, "IGNORING free_mntfs for <%s>: refc %d, flags %x (restarted)",
mf->mf_mount, mf->mf_refc, mf->mf_flags);
return;
}
* SUCH DAMAGE.
*
*
- * $Id: restart.c,v 1.13 2005/08/02 01:28:57 ezk Exp $
+ * $Id: restart.c,v 1.14 2005/08/02 22:48:28 ezk Exp $
*
*/
*/
(void) (*fs_ops->fs_init) (mf);
}
- plog(XLOG_INFO, "%s restarted fstype %s on %s",
- me->mnt_fsname, fs_ops->fs_type, me->mnt_dir);
+ plog(XLOG_INFO, "%s restarted fstype %s on %s, flags 0x%x",
+ me->mnt_fsname, fs_ops->fs_type, me->mnt_dir, mf->mf_flags);
} else {
/* Something strange happened - two mounts at the same place! */
free_mntfs(mf);