uint32_t VolIndex; /* Volume seqence no. */
uint32_t FirstIndex; /* First index this Volume */
uint32_t LastIndex; /* Last index this Volume */
- uint32_t StartFile; /* File for start of data */
- uint32_t EndFile; /* End file on Volume */
- uint32_t StartBlock; /* start block on tape */
- uint32_t EndBlock; /* last block */
int32_t Slot; /* Slot */
uint64_t StartAddr; /* Start address */
uint64_t EndAddr; /* End address */
break;
} else {
DBId_t StorageId;
+ uint32_t StartBlock, EndBlock, StartFile, EndFile;
bstrncpy(Vols[i].VolumeName, row[0], MAX_NAME_LENGTH);
bstrncpy(Vols[i].MediaType, row[1], MAX_NAME_LENGTH);
Vols[i].FirstIndex = str_to_uint64(row[2]);
Vols[i].LastIndex = str_to_uint64(row[3]);
- Vols[i].StartFile = str_to_uint64(row[4]);
- Vols[i].EndFile = str_to_uint64(row[5]);
- Vols[i].StartBlock = str_to_uint64(row[6]);
- Vols[i].EndBlock = str_to_uint64(row[7]);
- Vols[i].StartAddr = (((uint64_t)Vols[i].StartFile)<<32) | Vols[i].StartBlock;
- Vols[i].EndAddr = (((uint64_t)Vols[i].EndFile)<<32) | Vols[i].EndBlock;
+ StartFile = str_to_uint64(row[4]);
+ EndFile = str_to_uint64(row[5]);
+ StartBlock = str_to_uint64(row[6]);
+ EndBlock = str_to_uint64(row[7]);
+ Vols[i].StartAddr = (((uint64_t)StartFile)<<32) | StartBlock;
+ Vols[i].EndAddr = (((uint64_t)EndFile)<<32) | EndBlock;
// Vols[i].Copy = str_to_uint64(row[8]);
Vols[i].Slot = str_to_uint64(row[9]);
StorageId = str_to_uint64(row[10]);
VOL_PARAMS *VolParams = NULL;
int VolCount;
- char edt[50];
+ char edt[50], ed1[50], ed2[50];
if (*fname == '|') {
got_pipe = 1;
}
fprintf(fd, "VolSessionId=%u\n", jcr->VolSessionId);
fprintf(fd, "VolSessionTime=%u\n", jcr->VolSessionTime);
- fprintf(fd, "VolFile=%u-%u\n", VolParams[i].StartFile,
- VolParams[i].EndFile);
- fprintf(fd, "VolBlock=%u-%u\n", VolParams[i].StartBlock,
- VolParams[i].EndBlock);
+ fprintf(fd, "VolAddr=%s-%s\n",
+ edit_uint64(VolParams[i].StartAddr, ed1),
+ edit_uint64(VolParams[i].EndAddr, ed2));
fprintf(fd, "FileIndex=%d-%d\n", VolParams[i].FirstIndex,
VolParams[i].LastIndex);
}
}
fprintf(fd, "VolSessionId=%u\n", bsr->VolSessionId);
fprintf(fd, "VolSessionTime=%u\n", bsr->VolSessionTime);
-// if (bsr->VolParams[i].StartFile == bsr->VolParams[i].EndFile) {
-// fprintf(fd, "VolFile=%u\n", bsr->VolParams[i].StartFile);
-// } else {
-// fprintf(fd, "VolFile=%u-%u\n", bsr->VolParams[i].StartFile,
-// bsr->VolParams[i].EndFile);
-// }
-// if (bsr->VolParams[i].StartBlock == bsr->VolParams[i].EndBlock) {
-// fprintf(fd, "VolBlock=%u\n", bsr->VolParams[i].StartBlock);
-// } else {
-// fprintf(fd, "VolBlock=%u-%u\n", bsr->VolParams[i].StartBlock,
-// bsr->VolParams[i].EndBlock);
-// }
fprintf(fd, "VolAddr=%s-%s\n", edit_uint64(bsr->VolParams[i].StartAddr, ed1),
edit_uint64(bsr->VolParams[i].EndAddr, ed2));
// Dmsg2(100, "bsr VolParam FI=%u LI=%u\n",
}
fprintf(fd, "VolSessionId=%u\n", bsr->VolSessionId);
fprintf(fd, "VolSessionTime=%u\n", bsr->VolSessionTime);
-// if (bsr->VolParams[i].StartFile == bsr->VolParams[i].EndFile) {
-// fprintf(fd, "VolFile=%u\n", bsr->VolParams[i].StartFile);
-// } else {
-// fprintf(fd, "VolFile=%u-%u\n", bsr->VolParams[i].StartFile,
-// bsr->VolParams[i].EndFile);
-// }
-// if (bsr->VolParams[i].StartBlock == bsr->VolParams[i].EndBlock) {
-// fprintf(fd, "VolBlock=%u\n", bsr->VolParams[i].StartBlock);
-// } else {
-// fprintf(fd, "VolBlock=%u-%u\n", bsr->VolParams[i].StartBlock,
-// bsr->VolParams[i].EndBlock);
-// }
fprintf(fd, "VolAddr=%s-%s\n", edit_uint64(bsr->VolParams[i].StartAddr, ed1),
edit_uint64(bsr->VolParams[i].EndAddr, ed2));
// Dmsg2(100, "bsr VolParam FI=%u LI=%u\n",
if (!match_voladdr(bsr, bsr->voladdr, rec, 1)) {
if (bsr->voladdr) {
- Dmsg3(dbglevel, "Fail on Addr=%lld. bsr=%lld,%lld\n",
+ Dmsg3(dbglevel, "Fail on Addr=%llu. bsr=%llu,%llu\n",
get_record_address(rec), bsr->voladdr->saddr, bsr->voladdr->eaddr);
}
goto no_match;
return 1; /* All File records OK for this match */
}
uint64_t addr = get_record_address(rec);
-// Dmsg3(dbglevel, "match_voladdr: saddr=%lld eaddr=%lld recaddr=%lld\n",
+// Dmsg3(dbglevel, "match_voladdr: saddr=%llu eaddr=%llu recaddr=%llu\n",
// volblock->saddr, volblock->eaddr, addr);
if (voladdr->saddr <= addr && voladdr->eaddr >= addr) {
return 1;
if (voladdr->done && done) {
bsr->done = true;
bsr->root->reposition = true;
- Dmsg2(dbglevel, "bsr done from voladdr rec=%lld voleaddr=%lld\n",
+ Dmsg2(dbglevel, "bsr done from voladdr rec=%llu voleaddr=%llu\n",
addr, voladdr->eaddr);
}
return 0;
void dump_voladdr(BSR_VOLADDR *voladdr)
{
if (voladdr) {
- Pmsg2(-1, _("VolAddr : %lld-%lld\n"), voladdr->saddr, voladdr->eaddr);
+ Pmsg2(-1, _("VolAddr : %llu-%llu\n"), voladdr->saddr, voladdr->eaddr);
dump_voladdr(voladdr->next);
}
}
mixed priorities
General:
+19Dec08
+ebl Cleanup director VolParam struct
18Dec08
ebl Replace File:Block in BSR by Address to fix #1190
16Dec08