]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Fix the LastWritten field which was updated during
authorEric Bollengier <eric@eb.homelinux.org>
Fri, 26 Oct 2007 17:19:39 +0000 (17:19 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Fri, 26 Oct 2007 17:19:39 +0000 (17:19 +0000)
     a restore (or a reading migration) This fixes bug #982

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

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

index cc1903615f8ea585503b65f9d0e8d53060a7150b..fe4eacc94ab0a2367aa30c3e92cb60930549ac80 100644 (file)
@@ -266,6 +266,11 @@ void catalog_request(JCR *jcr, BSOCK *bs)
          }
       }
       Dmsg2(400, "Update media: BefVolJobs=%u After=%u\n", mr.VolJobs, sdmr.VolJobs);
+      /* Check if the volume has been written by the job, 
+       * and update the LastWritten field if needed */
+      if (mr.VolBlocks != sdmr.VolBlocks) {
+         mr.LastWritten = sdmr.LastWritten;
+      }
       /* Copy updated values to original media record */
       mr.VolJobs      = sdmr.VolJobs;
       mr.VolFiles     = sdmr.VolFiles;
@@ -274,7 +279,6 @@ void catalog_request(JCR *jcr, BSOCK *bs)
       mr.VolMounts    = sdmr.VolMounts;
       mr.VolErrors    = sdmr.VolErrors;
       mr.VolWrites    = sdmr.VolWrites;
-      mr.LastWritten  = sdmr.LastWritten;
       mr.Slot         = sdmr.Slot;
       mr.InChanger    = sdmr.InChanger;
       mr.VolReadTime  = sdmr.VolReadTime;
index 3708209945ef52e0d45a898be69daf020afb4e25..94a45b485263f347a8974e8b79ac8906f9a484de 100644 (file)
@@ -1,6 +1,9 @@
               Technical notes on version 2.2
 
 General:
+26Oct07
+ebl  Apply 2.2.5-lastwritten.patch to fix the LastWritten field 
+     which was updated during a restore (or a reading migration) bug #982
 24Oct07
 ebl  Use qmake-qt4 instead of qmake when available (debian system). 
 22Oct07