if (vp->specialStatus == VBUSY)
isbusy = 1;
VDetachVolume_r(ec, vp);
+ if ( *ec ) {
+ Log("VAttachVolume: Error detaching volume (%s)\n", name);
+ }
}
}
if (!(partp = VGetPartition_r(partition, 0))) {
*ec = VNOVOL;
+ Log("VAttachVolume: Error getting partition (%s)\n", partition);
goto done;
}
if ((fd = open(path, O_RDONLY)) == -1 || fstat(fd,&status) == -1) {
close(fd);
VOL_LOCK
+ Log("VAttachVolume: Error opening/statting volume header file (%s)\n", path);
*ec = VNOVOL;
goto done;
}
#endif
VUpdateVolume_r(ec,vp);
if (*ec) {
+ Log("VAttachVolume: Error updating volume\n");
if (vp)
VPutVolume_r(vp);
goto done;
V_dontSalvage(vp) = DONT_SALVAGE;
VAddToVolumeUpdateList_r(ec,vp);
if (*ec) {
+ Log("VAttachVolume: Error adding volume to update list\n");
if (vp)
VPutVolume_r(vp);
goto done;
(char *)&V_disk(vp), sizeof(V_disk(vp)),
VOLUMEINFOMAGIC, VOLUMEINFOVERSION);
VOL_LOCK
+ if (*ec) {
+ Log("VAttachVolume: Error reading diskDataHandle vol header %s; error=%d\n",
+ path, *ec);
+ }
if (!*ec) {
struct IndexFileHeader iHead;
(char *)&iHead, sizeof(iHead),
SMALLINDEXMAGIC, SMALLINDEXVERSION);
VOL_LOCK
+ if (*ec) {
+ Log("VAttachVolume: Error reading smallVnode vol header %s; error=%d\n",
+ path, *ec);
+ }
}
if (!*ec) {
struct IndexFileHeader iHead;
(char *)&iHead, sizeof(iHead),
LARGEINDEXMAGIC, LARGEINDEXVERSION);
VOL_LOCK
+ if (*ec) {
+ Log("VAttachVolume: Error reading largeVnode vol header %s; error=%d\n",
+ path, *ec);
+ }
}
#ifdef AFS_NAMEI_ENV
if (!*ec) {
(char *)&stamp, sizeof(stamp),
LINKTABLEMAGIC, LINKTABLEVERSION);
VOL_LOCK
+ if (*ec) {
+ Log("VAttachVolume: Error reading namei vol header %s; error=%d\n",
+ path, *ec);
+ }
}
#endif
if (*ec) {
- Log("VAttachVolume: Error attaching volume %s; volume needs salvage\n",
- path);
+ Log("VAttachVolume: Error attaching volume %s; volume needs salvage; error=%d\n",
+ path, *ec);
FreeVolume(vp);
return NULL;
}
VOL_LOCK
if (*ec) {
FreeVolume(vp);
+ Log("VAttachVolume: error getting bitmap for volume (%s)\n", path);
return NULL;
}
}
pntr->status = 0; /*things are messed up */
strcpy(pntr->name,volname);
pntr->volid = volid;
- Log("1 Volser: ListVolumes: Could not attach volume %u\n",volid);
+ Log("1 Volser: ListVolumes: Could not attach volume %u (%s:%s), error=%d\n",volid,pname,volname,error);
goto drop;
}
if(tv->header->diskstuff.destroyMe == DESTROY_ME) {
pntr->status = 0;
strcpy(pntr->name,volname);
pntr->volid = volid;
- Log("1 Volser: ListVolumes: Volume %u will be destroyed on next salvage\n",volid);
+ Log("1 Volser: ListVolumes: Volume %u (%s) will be destroyed on next salvage\n",volid,volname);
goto drop;
}
pntr->status = 0;
strcpy(pntr->name,volname);
pntr->volid = volid;
- Log("1 Volser: ListVolumes: Volume %u needs to be salvaged\n",volid);
+ Log("1 Volser: ListVolumes: Volume %u (%s) needs to be salvaged\n",volid,volname);
goto drop;
}
pntr->status = 0; /*things are messed up */
strcpy(pntr->name,volname);
pntr->volid = volid;
- Log("1 Volser: ListVolumes: Could not attach volume %u\n",volid);
+ Log("1 Volser: ListVolumes: Could not attach volume %u (%s) error=%d\n",volid,volname,error);
goto drop;
}
if(tv->header->diskstuff.needsSalvaged){
pntr->status = 0;
strcpy(pntr->name,volname);
pntr->volid = volid;
- Log("1 Volser: ListVolumes: Volume %u needs to be salvaged\n",volid);
+ Log("1 Volser: ListVolumes: Volume %u (%s) needs to be salvaged\n",volid, volname);
goto drop;
}