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;
}
}