From cf8eefda6fcfb6a4e73933a7b97430385178cbfc Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 25 Oct 2007 21:08:05 +0000 Subject: [PATCH] ebl fix #982 about LastWritten field which is updated during restore. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5806 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/patches/2.2.5-lastwritten.patch | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bacula/patches/2.2.5-lastwritten.patch diff --git a/bacula/patches/2.2.5-lastwritten.patch b/bacula/patches/2.2.5-lastwritten.patch new file mode 100644 index 0000000000..c5373bcfec --- /dev/null +++ b/bacula/patches/2.2.5-lastwritten.patch @@ -0,0 +1,41 @@ + + This bug fixes the LastWritten field which was updated during + a restore (or a reading migration) + This fixes bug #982 + + This patch applies to Bacula version 2.2.5 (and previous versions), + and can be applied with the following: + + cd + patch -p0 <2.2.5-lastwritten.patch + ./configure (your options) + make + ... + make install + + + +Index: src/dird/catreq.c +=================================================================== +--- src/dird/catreq.c (révision 5789) ++++ src/dird/catreq.c (copie de travail) +@@ -266,6 +266,11 @@ + } + } + 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 @@ + 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; -- 2.39.5