From: Michal Rakowski Date: Wed, 12 Jan 2022 18:41:07 +0000 (+0100) Subject: Fix #8566 About reusing Immutable volume X-Git-Tag: Beta-15.0.0~685 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d65e59880c4d4210b43583b2f4607fbf31a0f477;p=thirdparty%2Fbacula.git Fix #8566 About reusing Immutable volume Added missing check for MinimumVolumeProtectionTime during searching for next volume to write. --- diff --git a/bacula/src/stored/vol_mgr.c b/bacula/src/stored/vol_mgr.c index dde528a14..53d7d54e0 100644 --- a/bacula/src/stored/vol_mgr.c +++ b/bacula/src/stored/vol_mgr.c @@ -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);