]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix bug pointed out by Peter Much that causes the StorageId to
authorKern Sibbald <kern@sibbald.com>
Sat, 22 Mar 2008 09:34:20 +0000 (09:34 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 22 Mar 2008 09:34:20 +0000 (09:34 +0000)
     be updated when reading a tape (during migration, it could have
     been incorrectly set to the write StorageId).

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6663 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/catreq.c
bacula/technotes-2.1

index fe4eacc94ab0a2367aa30c3e92cb60930549ac80..dcc58a48a51ad75af491e7bfca18b3683b50c22a 100644 (file)
@@ -285,7 +285,12 @@ void catalog_request(JCR *jcr, BSOCK *bs)
       mr.VolWriteTime = sdmr.VolWriteTime;
       mr.VolParts     = sdmr.VolParts;
       bstrncpy(mr.VolStatus, sdmr.VolStatus, sizeof(mr.VolStatus));
-      if (jcr->wstore && jcr->wstore->StorageId) {
+      /*
+       * Update to point to the last device used to write the Volume.
+       *   However, do so only if we are writing the tape, i.e.
+       *   the number of VolBlocks has increased.
+       */
+      if (jcr->wstore && jcr->wstore->StorageId && mr.VolBlocks != sdmr.VolBlocks) {
          mr.StorageId = jcr->wstore->StorageId;
       }
 
index ea625f699fe10622aa1c392f6597256e077765b0..6e7a22eb01da0f9588315a2683a20607e3e2c394 100644 (file)
@@ -1,6 +1,10 @@
               Technical notes on version 2.2
 
 General:
+22Mar08
+kes  Fix bug pointed out by Peter Much that causes the StorageId to
+     be updated when reading a tape (during migration, it could have
+     been incorrectly set to the write StorageId).
 21Mar08
 kes  Implement autostart scripts for Debian 
 20Mar08