Final items for 1.37 before release:
1. Fix bugs
- Look at fixing restore status stats in SD.
+- Check if ANSI tape labeling works with drive in
+ read-only mode.
+ > > btape: label.c:299 write_volume_label()
+ > > btape: label.c:302 Label type=0
+ > > btape: dev.c:648 rewind_dev fd=3 "VTS0" (/dev/tape0)
+ > > btape: label.c:530 Start create_volume_label()
+ > >
+ > > Volume Label:
+ > > Id : Bacula 1.0 immortal
+ > > VerNo : 11
+ > > VolName : 450340
+ > > PrevVolName :
+ > > VolFile : 0
+ > > LabelType : PRE_LABEL
+ > > LabelSize : 0
+ > > PoolName : Default
+ > > MediaType : VTS
+ > > PoolType : Backup
+ > > HostName : sysrmr.eia.doe.gov
+ > > btape: ansi_label.c:282 Write ANSI label type=2
+ > > 15-Sep 13:12 btape: btape Fatal error: ansi_label.c:303 Could not
+ > > write ANSI VOL1
+ > > label. ERR=Bad file descriptor
+
- Check "update slots=7 scan storage=DLT drive=0" with
non-bacula tape in the drive.
General:
Changes to 1.37.39:
+16Sep05
+- Add code to reservation VOLRES subroutines to try to ensure
+ we don't end up with two Volumes on the same drive.
+- Simplify the mutex code in VOLRES a bit to reduce the chance
+ of error.
15Sep05
- Apply Nicolas' dvd-freespace.in patch.
- Make sure SQL table names are not translated.
VOLRES *vol, *nvol;
Dmsg1(400, "new_volume %s\n", VolumeName);
+ P(vol_list_lock);
+ if (dcr->dev) {
+ foreach_dlist(vol, vol_list) {
+ if (vol && vol->dev == dcr->dev) {
+ vol_list->remove(vol);
+ if (vol->vol_name) {
+ free(vol->vol_name);
+ }
+ free(vol);
+ break;
+ }
+ }
+ }
vol = (VOLRES *)malloc(sizeof(VOLRES));
memset(vol, 0, sizeof(VOLRES));
vol->vol_name = bstrdup(VolumeName);
vol->dev = dcr->dev;
vol->dcr = dcr;
- P(vol_list_lock);
nvol = (VOLRES *)vol_list->binary_insert(vol, my_compare);
- V(vol_list_lock);
if (nvol != vol) {
free(vol->vol_name);
free(vol);
+ vol = NULL;
if (dcr->dev) {
nvol->dev = dcr->dev;
}
- return NULL;
}
+ V(vol_list_lock);
return vol;
}
VOLRES *find_volume(const char *VolumeName)
{
VOLRES vol, *fvol;
- vol.vol_name = bstrdup(VolumeName);
P(vol_list_lock);
+ vol.vol_name = bstrdup(VolumeName);
fvol = (VOLRES *)vol_list->binary_search(&vol, my_compare);
- V(vol_list_lock);
free(vol.vol_name);
+ V(vol_list_lock);
return fvol;
}
{
VOLRES vol, *fvol;
+ P(vol_list_lock);
if (dev->VolHdr.VolumeName[0] == 0) {
/*
* Our device has no VolumeName listed, but
* search the list for any Volume attached to
* this device and remove it.
*/
- P(vol_list_lock);
foreach_dlist(fvol, vol_list) {
if (fvol && fvol->dev == dev) {
vol_list->remove(fvol);
break;
}
}
- V(vol_list_lock);
- return fvol != NULL;
+ goto bail_out;
}
Dmsg1(400, "free_volume %s\n", dev->VolHdr.VolumeName);
vol.vol_name = bstrdup(dev->VolHdr.VolumeName);
- P(vol_list_lock);
fvol = (VOLRES *)vol_list->binary_search(&vol, my_compare);
if (fvol) {
vol_list->remove(fvol);
free(fvol->vol_name);
free(fvol);
}
- V(vol_list_lock);
free(vol.vol_name);
dev->VolHdr.VolumeName[0] = 0;
+bail_out:
+ V(vol_list_lock);
return fvol != NULL;
}
#undef VERSION
#define VERSION "1.37.39"
-#define BDATE "15 September 2005"
-#define LSMDATE "15Sep05"
+#define BDATE "16 September 2005"
+#define LSMDATE "16Sep05"
/* Debug flags */
#undef DEBUG