]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #8566 About reusing Immutable volume
authorMichal Rakowski <michal.rakowski@baculasystems.com>
Wed, 12 Jan 2022 18:41:07 +0000 (19:41 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:57 +0000 (13:56 +0200)
Added missing check for MinimumVolumeProtectionTime
during searching for next volume to write.

bacula/src/stored/vol_mgr.c

index dde528a14980a74028fe894cfd776551418c1f21..53d7d54e01989484e27a68ae0e934d6a52dcb830 100644 (file)
@@ -835,7 +835,9 @@ bool DCR::can_i_write_volume()
       return false;
    }
 
-   if (dev->device->set_vol_immutable && dev->check_for_immutable(VolumeName)) {
+   if (dev->device->set_vol_immutable &&
+       dev->check_for_immutable(VolumeName) &&
+       (dev->check_volume_protection_time(VolumeName) == false)) {
       MmsgD1(dbglvl, jcr->errmsg, _("Skipping Volume %s, "
                                     "because Volume's Protection Period has not expired yet\n"),
              VolumeName);