|| vsp->header.parent == singleVolumeNumber)) {
(void)afs_snprintf(nameShouldBe, sizeof nameShouldBe,
VFORMAT, vsp->header.id);
- if (singleVolumeNumber)
+ if (singleVolumeNumber
+ && vsp->header.id != singleVolumeNumber)
AskOffline(vsp->header.id, fileSysPartition->name);
if (strcmp(nameShouldBe, dp->d_name)) {
if (!Showmode)
struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
Inode oldinode, newinode;
DirHandle newdir;
+ FdHandle_t *fdP;
afs_int32 code;
afs_sfsize_t lcode;
afs_int32 parentUnique = 1;
struct VnodeEssence *vnodeEssence;
+ afs_size_t length;
if (Testing)
return;
}
vnode.cloned = 0;
VNDISK_SET_INO(&vnode, newinode);
- VNDISK_SET_LEN(&vnode, Length(&newdir));
+ length = Length(&newdir);
+ VNDISK_SET_LEN(&vnode, length);
lcode =
IH_IWRITE(vnodeInfo[vLarge].handle,
vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
#else
vnodeInfo[vLarge].handle->ih_synced = 1;
#endif
+ /* make sure old directory file is really closed */
+ fdP = IH_OPEN(dir->dirHandle.dirh_handle);
+ FDH_REALLYCLOSE(fdP);
+
code = IH_DEC(dir->ds_linkH, oldinode, dir->rwVid);
assert(code == 0);
dir->dirHandle = newdir;
int
VVolOpSetVBusy_r(Volume * vp, FSSYNC_VolOp_info * vopinfo)
{
- return (vopinfo->com.command == FSYNC_VOL_NEEDVOLUME &&
+ return ((vopinfo->com.command == FSYNC_VOL_OFF &&
+ vopinfo->com.reason == FSYNC_SALVAGE) ||
+ (vopinfo->com.command == FSYNC_VOL_NEEDVOLUME &&
(vopinfo->com.reason == V_CLONE ||
- vopinfo->com.reason == V_DUMP));
+ vopinfo->com.reason == V_DUMP)));
}