struct rx_call *call; /* call to which to write, might be an array */
int device; /* dump device ID for volume */
int parentId; /* dump parent ID for volume */
- struct DiskPartition *dumpPartition; /* Dump partition. */
+ struct DiskPartition64 *dumpPartition; /* Dump partition. */
struct rx_call **calls; /* array of pointers to calls */
int ncalls; /* how many calls/codes in array */
int *codes; /* one return code for each call */
DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
{
int code = 0, error = 0;
- afs_int32 pad = 0, offset;
+ afs_int32 pad = 0;
+ afs_int32 offset = 0;
afs_sfsize_t n, nbytes, howMany, howBig;
- afs_foff_t lcode;
+ afs_foff_t lcode = 0;
byte *p;
#ifndef AFS_NT40_ENV
struct afs_stat status;
return VOLSERDUMPERROR;
}
howMany = (afs_sfsize_t) tstatfs.f_bsize;
- Log("DumpFile: fstatfs returned block size of %lld; howMany=%lld", tstatfs.f_bsize, howMany);
#else
howMany = status.st_blksize;
#endif /* AFS_AIX_ENV */
(size <=
vcp->diskSize ? 0 : size - vcp->diskSize) >> vcp->logSize;
if (nVnodes > 0) {
+ if (DoLogging) {
+ Log("RestoreVolume ProcessIndex: Set up %d inodes for volume %d\n",
+ nVnodes, V_id(vp));
+ }
Buf = (afs_int32 *) malloc(nVnodes * sizeof(afs_int32));
if (Buf == NULL) {
STREAM_CLOSE(afile);
}
offset += vcp->diskSize;
}
+ if (DoLogging) {
+ Log("RestoreVolume ProcessIndex: found %d inodes\n", cnt);
+ }
*Bufp = Buf;
*sizep = nVnodes;
}
iod_Init(iodp, call);
vp = avp;
- if (V_parentId(vp) == V_id(vp))
- delo = incremental;
if (!ReadDumpHeader(iodp, &header)) {
Log("1 Volser: RestoreVolume: Error reading header file for dump; aborted\n");
if (!ReadInt32(iodp, &vnode->uniquifier))
return VOLSERREAD_DUMPERROR;
+
+ if (DoLogging) {
+ Log("ReadVnodes: setup %d/%d\n", vnodeNumber, vnode->uniquifier);
+ }
while ((tag = iod_getc(iodp)) > D_MAX && tag != EOF) {
haveStuff = 1;
switch (tag) {
V_parentId(vp), vnodeNumber,
vnode->uniquifier, vnode->dataVersion);
if (!VALID_INO(ino)) {
- perror("unable to allocate inode");
- Log("1 Volser: ReadVnodes: Restore aborted\n");
+ Log("1 Volser: ReadVnodes: IH_CREATE: %s - restore aborted\n",
+ afs_error_message(errno));
return VOLSERREAD_DUMPERROR;
}
nearInode = ino;
IH_INIT(tmpH, vp->device, V_parentId(vp), ino);
fdP = IH_OPEN(tmpH);
if (fdP == NULL) {
+ Log("1 Volser: ReadVnodes: IH_OPEN: %s - restore aborted\n",
+ afs_error_message(errno));
IH_RELEASE(tmpH);
return VOLSERREAD_DUMPERROR;
}