]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/block.c
Prevent a Volume that is being swapped from being freed from
[bacula/bacula] / bacula / src / stored / block.c
index b9cbbfa36acaf72ae8c5c831ac24953ed4d438b8..5efc332669f878680dc1585a0a2cc6f80ec77757 100644 (file)
@@ -374,7 +374,6 @@ bool write_block_to_device(DCR *dcr)
       if (dcr->NewVol) {
          /* Note, setting a new volume also handles any pending new file */
          set_new_volume_parameters(dcr);
-         dcr->NewFile = false;        /* this handled for new file too */
       } else {
          set_new_file_parameters(dcr);
       }
@@ -705,6 +704,11 @@ static void reread_last_block(DCR *dcr)
 #endif
 }
 
+/*
+ * If this routine is called, we do our bookkeeping and
+ *   then assure that the volume will not be written any
+ *   more.
+ */
 static bool terminate_writing_volume(DCR *dcr)
 {
    DEVICE *dev = dcr->dev;