src/stored/vol_mgr.c
void add_read_volume(JCR *jcr, const char *VolumeName)
{
   VOLRES *nvol, *vol;

   nvol = new_vol_item(NULL, VolumeName);
   nvol->set_jobid(jcr->JobId);
   nvol->set_reading();
   lock_read_volumes();
   vol = (VOLRES *)read_vol_list->binary_insert(nvol, read_compare);
   if (vol != nvol) {
      free_vol_item(nvol);
      Dmsg2(dbglvl, "read_vol=%s JobId=%d already in list.\n", VolumeName, jcr->JobId);
   } else {
      Dmsg2(dbglvl, "add read_vol=%s JobId=%d\n", VolumeName, jcr->JobId);
   }
   unlock_read_volumes();
}
/*
 * Add a volume to the read list.
 * Note, we use VOLRES because it simplifies the code
 *   even though, the only part of VOLRES that we need is
 *   the volume name.  The same volume may be in the list
 *   multiple times, but each one is distinguished by the
 *   JobId.  We use JobId, VolumeName as the key.
 * We can get called multiple times for the same volume because
 *   when parsing the bsr, the volume name appears multiple times.
 */
Add a volume to the read list.
Note, we use VOLRES because it simplifies the code
even though, the only part of VOLRES that we need is
the volume name.  The same volume may be in the list
multiple times, but each one is distinguished by the
JobId.  We use JobId, VolumeName as the key.
We can get called multiple times for the same volume because
when parsing the bsr, the volume name appears multiple times.
Add a volume to the read list . Note we use VOLRES because it simplifies the code even though the only part of VOLRES that we need is the volume name . The same volume may be in the list multiple times but each one is distinguished by the JobId . We use JobId VolumeName as the key . We can get called multiple times for the same volume because when parsing the bsr the volume name appears multiple times .
void add_read_volume(JCR *jcr, const char *VolumeName)
{
   VOLRES *nvol, *vol;
   nvol = new_vol_item(NULL, VolumeName);
   nvol->set_jobid(jcr->JobId);
   nvol->set_reading();
   lock_read_volumes();
   vol = (VOLRES *)read_vol_list->binary_insert(nvol, read_compare);
   if (vol != nvol) {
      free_vol_item(nvol);
      Dmsg2(dbglvl, "read_vol=%s JobId=%d already in list.\n", VolumeName, jcr->JobId);
   } else {
      Dmsg2(dbglvl, "add read_vol=%s JobId=%d\n", VolumeName, jcr->JobId);
   }
   unlock_read_volumes();
}
void add_read_volume ( JCR * jcr , const char * VolumeName ) { VOLRES * nvol , * vol ; nvol = new_vol_item ( NULL , VolumeName ) ; nvol -> set_jobid ( jcr -> JobId ) ; nvol -> set_reading ( ) ; lock_read_volumes ( ) ; vol = ( VOLRES * ) read_vol_list -> binary_insert ( nvol , read_compare ) ; if ( vol != nvol ) { free_vol_item ( nvol ) ; Dmsg2 ( dbglvl , " \n " , VolumeName , jcr -> JobId ) ; } else { Dmsg2 ( dbglvl , " \n " , VolumeName , jcr -> JobId ) ; } unlock_read_volumes ( ) ; }
Add a volume to the read list.
Add a volume to the read list .