Dmsg4(100, "=== nwriters=%d nres=%d vcatjob=%d dev=%s\n",
dev->num_writers, dev->num_reserved(), dev->VolCatInfo.VolCatJobs,
dev->print_name());
- dir_update_volume_info(dcr, false, false); /* send Volume info to Director */
- ok = true;
+ ok = dir_update_volume_info(dcr, false, false); /* send Volume info to Director */
get_out:
/* Don't plugin close here, we might have multiple writers */
}
Dmsg1(100, "get_volume_info() %s", dir->msg);
/* Update dev Volume info in case something changed (e.g. expired) */
+ vol->Slot = dev->VolCatInfo.Slot;
+ bstrncpy(vol->VolCatStatus, dcr->VolCatInfo.VolCatStatus, sizeof(vol->VolCatStatus));
+
dcr->VolCatInfo.VolCatAdataBytes = dev->VolCatInfo.VolCatAdataBytes;
dcr->VolCatInfo.VolCatAmetaBytes = dev->VolCatInfo.VolCatAmetaBytes;
dcr->VolCatInfo.VolCatHoleBytes = dev->VolCatInfo.VolCatHoleBytes;
dcr->VolCatInfo.VolCatAmetaPadding = dev->VolCatInfo.VolCatAmetaPadding;
dcr->VolCatInfo.VolCatAdataPadding = dev->VolCatInfo.VolCatAdataPadding;
dcr->VolCatInfo.VolCatFiles = dev->VolCatInfo.VolCatFiles;
- bstrncpy(vol->VolCatStatus, dcr->VolCatInfo.VolCatStatus, sizeof(vol->VolCatStatus));
- /* ***FIXME*** copy other fields that can change, if any */
+ dcr->VolCatInfo.VolCatBytes = dev->VolCatInfo.VolCatBytes;
+ dcr->VolCatInfo.VolCatMounts = dev->VolCatInfo.VolCatMounts;
+ dcr->VolCatInfo.VolCatJobs = dev->VolCatInfo.VolCatJobs;
+ dcr->VolCatInfo.VolCatFiles = dev->VolCatInfo.VolCatFiles;
+ dcr->VolCatInfo.VolCatRecycles = dev->VolCatInfo.VolCatRecycles;
+ dcr->VolCatInfo.VolCatWrites = dev->VolCatInfo.VolCatWrites;
+ dcr->VolCatInfo.VolCatReads = dev->VolCatInfo.VolCatReads;
ok = true;
}
dev->Lock(); /* lock again */
dev->VolCatInfo.VolCatJobs++; /* increment number of jobs on vol */
- dir_update_volume_info(dcr, false, false); /* send Volume info to Director */
+ if (!dir_update_volume_info(dcr, false, false)) { /* send Volume info to Director */
+ goto bail_out;
+ }
Jmsg(jcr, M_INFO, 0, _("New volume \"%s\" mounted on device %s at %s.\n"),
dcr->VolumeName, dev->print_name(), bstrftime(dt, sizeof(dt), time(NULL)));
dev->setVolCatStatus("Append");
ASSERT(dcr->VolumeName[0]);
dev->setVolCatName(dcr->VolumeName);
- if (!dir_update_volume_info(dcr, true, true)) { /* indicate doing relabel */
+ if (!dir_update_volume_info(dcr, true, true)) { /* indicate relabel */
Leave(100);
return false;
}