From: Kern Sibbald Date: Wed, 28 May 2008 13:28:29 +0000 (+0000) Subject: -28May08 X-Git-Tag: Release-2.4.0~22 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0da16ea7e38f6c9d84f5f7f17e76fd71f82ddc4;p=bacula%2Fbacula -28May08 -kes Add debug code to SD. -kes Fix renaming a Volume, which used the wrong Volume name. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@7044 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/label.c b/bacula/src/stored/label.c index fbded4347c..d5c981bbd6 100644 --- a/bacula/src/stored/label.c +++ b/bacula/src/stored/label.c @@ -295,7 +295,8 @@ bool write_volume_label_to_block(DCR *dcr) dev->print_name()); return false; } else { - Dmsg1(130, "Wrote label of %d bytes to block\n", rec.data_len); + Dmsg2(130, "Wrote label of %d bytes to block. Vol=%s\n", rec.data_len, + dcr->VolumeName); } free_pool_memory(rec.data); return true; @@ -447,6 +448,7 @@ bool rewrite_volume_label(DCR *dcr, bool recycle) Dmsg0(200, "Error from write volume label.\n"); return false; } + Dmsg1(150, "wrote vol label to block. Vol=%s\n", dcr->VolumeName); dev->VolCatInfo.VolCatBytes = 0; /* reset byte count */ @@ -464,6 +466,7 @@ bool rewrite_volume_label(DCR *dcr, bool recycle) return false; } if (recycle) { + Dmsg1(150, "Doing recycle. Vol=%s\n", dcr->VolumeName); // volume_unused(dcr); /* mark volume unused */ if (!dev->truncate(dcr)) { Jmsg2(jcr, M_FATAL, 0, _("Truncate error on device %s: ERR=%s\n"), @@ -517,8 +520,9 @@ bool rewrite_volume_label(DCR *dcr, bool recycle) dev->VolCatInfo.VolCatWrites = 1; dev->VolCatInfo.VolCatReads = 1; } - Dmsg0(150, "dir_update_vol_info. Set Append\n"); + Dmsg1(150, "dir_update_vol_info. Set Append vol=%s\n", dcr->VolumeName); bstrncpy(dev->VolCatInfo.VolCatStatus, "Append", sizeof(dev->VolCatInfo.VolCatStatus)); + bstrncpy(dev->VolCatInfo.VolCatName, dcr->VolumeName, sizeof(dev->VolCatInfo.VolCatName)); if (!dir_update_volume_info(dcr, true, true)) { /* indicate doing relabel */ return false; } @@ -533,7 +537,7 @@ bool rewrite_volume_label(DCR *dcr, bool recycle) * End writing real Volume label (from pre-labeled tape), or recycling * the volume. */ - Dmsg0(200, "OK from rewrite vol label.\n"); + Dmsg1(150, "OK from rewrite vol label. Vol=%s\n", dcr->VolumeName); return true; } @@ -589,6 +593,7 @@ static void create_volume_label_record(DCR *dcr, DEV_RECORD *rec) ser_string(dev->VolHdr.ProgDate); ser_end(rec->data, SER_LENGTH_Volume_Label); + bstrncpy(dcr->VolumeName, dev->VolHdr.VolumeName, sizeof(dcr->VolumeName)); rec->data_len = ser_length(rec->data); rec->FileIndex = dev->VolHdr.LabelType; rec->VolSessionId = jcr->VolSessionId; diff --git a/bacula/src/version.h b/bacula/src/version.h index 0e40b296aa..4f97d02790 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.2.10-b4" -#define BDATE "26 May 2008" -#define LSMDATE "26May08" +#define BDATE "28 May 2008" +#define LSMDATE "28May08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 6144ca3242..4ab0a6da64 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -1,6 +1,9 @@ Technical notes on version 2.2 General: +28May08 +kes Add debug code to SD. +kes Fix renaming a Volume, which used the wrong Volume name. 26May08 kes If operator has rewind tape, print warning, release tape and try once more. If tape is positioned somewhere, something went