mr->Slot,
edit_uint64(mr->VolBytes, ed5),
mr->InChanger,
- edit_uint64(mr->VolReadTime, ed6),
- edit_uint64(mr->VolWriteTime, ed7),
+ edit_int64(mr->VolReadTime, ed6),
+ edit_int64(mr->VolWriteTime, ed7),
mr->VolParts,
mr->LabelType,
edit_int64(mr->StorageId, ed8),
mr->InChanger = str_to_int64(row[20]);
mr->VolParts = str_to_int64(row[21]);
mr->LabelType = str_to_int64(row[22]);
- mr->VolReadTime = str_to_uint64(row[23]);
- mr->VolWriteTime = str_to_uint64(row[24]);
+ mr->VolReadTime = str_to_int64(row[23]);
+ mr->VolWriteTime = str_to_int64(row[24]);
mr->Enabled = 1; /* ensured via query */
sql_free_result(mdb);
mr->VolMounts, mr->VolErrors, mr->VolWrites,
edit_uint64(mr->MaxVolBytes, ed2),
mr->VolStatus, mr->Slot, mr->InChanger,
- edit_uint64(mr->VolReadTime, ed3),
- edit_uint64(mr->VolWriteTime, ed4),
+ edit_int64(mr->VolReadTime, ed3),
+ edit_int64(mr->VolWriteTime, ed4),
mr->VolParts,
mr->LabelType,
edit_int64(mr->StorageId, ed5),
edit_uint64(mr->VolCapacityBytes, ed3),
mr->VolStatus, mr->Slot, mr->MaxVolJobs, mr->MaxVolFiles,
mr->InChanger,
- edit_uint64(mr->VolReadTime, ed4),
- edit_uint64(mr->VolWriteTime, ed5),
+ edit_int64(mr->VolReadTime, ed4),
+ edit_int64(mr->VolWriteTime, ed5),
mr->EndFile, mr->EndBlock,
mr->VolParts,
mr->LabelType,
vol->VolCatWrites, edit_uint64(vol->VolCatMaxBytes, ed2),
LastWritten, vol->VolCatStatus, vol->Slot, label,
InChanger, /* bool in structure */
- edit_uint64(vol->VolReadTime, ed3),
- edit_uint64(vol->VolWriteTime, ed4),
+ edit_int64(vol->VolReadTime, ed3),
+ edit_int64(vol->VolWriteTime, ed4),
edit_uint64(vol->VolFirstWritten, ed5),
vol->VolCatParts);
Dmsg1(100, ">dird: %s", dir->msg);
}
/* return the last timer interval (ms) */
-int DEVICE::get_timer_count()
+btime_t DEVICE::get_timer_count()
{
btime_t old = last_timer;
- struct timeval tv;
- gettimeofday(&tv, NULL);
- last_timer = tv.tv_usec + tv.tv_sec * 1000000;
-
+ last_timer = get_current_btime();
return last_timer - old;
}
uint32_t VolCatMaxFiles; /* Maximum files to write to volume */
uint64_t VolCatMaxBytes; /* Max bytes to write to volume */
uint64_t VolCatCapacityBytes; /* capacity estimate */
- uint64_t VolReadTime; /* time spent reading */
- uint64_t VolWriteTime; /* time spent writing this Volume */
- int64_t VolMediaId; /* MediaId */
+ btime_t VolReadTime; /* time spent reading */
+ btime_t VolWriteTime; /* time spent writing this Volume */
+ int64_t VolMediaId; /* MediaId */
utime_t VolFirstWritten; /* Time of first write */
bool InChanger; /* Set if vol in current magazine */
char VolCatStatus[20]; /* Volume status */
btime_t last_timer; /* used by read/write/seek to get stats (usec) */
btime_t last_tick; /* contains last read/write time (usec) */
- uint64_t DevReadTime;
- uint64_t DevWriteTime;
+ btime_t DevReadTime;
+ btime_t DevWriteTime;
uint64_t DevWriteBytes;
uint64_t DevReadBytes;
/* Methods */
- int get_timer_count(); /* return the last timer interval (ms) */
+ btime_t get_timer_count(); /* return the last timer interval (ms) */
int has_cap(int cap) const { return capabilities & cap; }
void clear_cap(int cap) { capabilities &= ~cap; }
Technical notes on version 2.1
General:
+13Feb07
+ebl Use btime_t instead of uint64_t in media patch.
11Feb07
kes Optimize the use of the database a bit in the Status dir command.
Only open it when needed, ensure that if any previous database
kes Apply Eric's media patch that collects read/write media
times as well as byte counts. This patch requires a
simultaneous upgrade of the DIR and SD. Note, there
- should be some way to turn of timing. I'm not sure
+ should be some way to turn off timing. I'm not sure
times are in Bacula units.
kes Apply Eric's batch-insert patch.
09Feb07