Skip to content

Commit

Permalink
Overhaul of the vol_mgr.
Browse files Browse the repository at this point in the history
Remove some new code that seems to give some race conditions.
This essentially restores the volume manager to the way it worked in 13.2.

Additionally we changed the following:
   - Cleanup comments
   - Make free_volume_list() a generic function.
        Instead of some trickery with using some temp vars give
        free_volume_list() two args e.g. a comment what about what its freeing
        and a dlist with the actual volume list it needs to free. Then we can
        reuse this in 3 places to delete any volume list. We also don't
        have to lock the vol_list when freeing the temp_vol_list as it
        now no longer "misuses" the global dlist pointer.

Issues #414: Bareos storage daemon crashes during backups
  • Loading branch information
Marco van Wieringen committed Jun 2, 2015
1 parent 5b4afdd commit 8dc8375
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 160 deletions.
1 change: 1 addition & 0 deletions src/stored/reserve.c
Expand Up @@ -504,6 +504,7 @@ bool find_suitable_device_for_job(JCR *jcr, RCTX &rctx)

Dmsg0(dbglvl, "lock volumes\n");
free_temp_vol_list(temp_vol_list);
temp_vol_list = NULL;
}
if (ok) {
Dmsg1(dbglvl, "OK dev found. Vol=%s from in-use vols list\n", rctx.VolumeName);
Expand Down

0 comments on commit 8dc8375

Please sign in to comment.