FIXES 2518
namei_dec now logs if you have open ihandles when you unlink a file
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
FIXES 2518
flush all dir buffers we have cached when rewriting a volume from a restore
avoids holding an ihandle which has an open fdhandle for an unlinked file
====================
FIXES 2518
remove logging code for now. it appears to trigger on some possibly legitimate operations.
}
}
if (count == 0) {
- IHandle_t th = *ih;
- th.ih_ino = ino;
- namei_HandleToName(&name, &th);
+ IHandle_t *th;
+ IH_INIT(th, ih->ih_dev, ih->ih_vid, ino);
+#if 0
+ /* This triggers in the fileserver on the volume index vnodes */
+ if (th->ih_refcnt > 1)
+ Log("Warning: Leaked ref on ihandle dev %d vid %d ino %lld\n",
+ th->ih_dev, th->ih_vid, (int64_t) th->ih_ino);
+#endif
+ namei_HandleToName(&name, th);
+ IH_RELEASE(th);
code = unlink(name.n_path);
}
FDH_CLOSE(fdP);
}
strcpy(tt->lastProcName, "Restore");
tt->rxCallPtr = acid;
+
+ DFlushVolume(V_parentId(tt->volume)); /* Ensure dir buffers get dropped */
+
code = RestoreVolume(acid, tt->volume, (aflags & 1), cookie); /* last is incrementalp */
FSYNC_askfs(tt->volid, NULL, FSYNC_RESTOREVOLUME, 0l); /*break call backs on the
* restored volume */