From: Kern Sibbald Date: Sat, 21 Apr 2007 09:21:14 +0000 (+0000) Subject: Extend idea of Prefer Mounted Volumes to mean a volume about X-Git-Tag: Release-7.0.0~6549 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5f2c6798c9ad7aabc7bcb9efb881bef240c39b53;p=bacula%2Fbacula Extend idea of Prefer Mounted Volumes to mean a volume about to be mounted. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4579 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/reserve.c b/bacula/src/stored/reserve.c index ae0ad4175a..0e5e810a20 100644 --- a/bacula/src/stored/reserve.c +++ b/bacula/src/stored/reserve.c @@ -1080,15 +1080,17 @@ static int can_reserve_drive(DCR *dcr, RCTX &rctx) } /* Check for prefer mounted volumes */ - if (rctx.PreferMountedVols && !dev->VolHdr.VolumeName[0] && dev->is_tape()) { +// if (rctx.PreferMountedVols && !dev->VolHdr.VolumeName[0] && dev->is_tape()) { + if (rctx.PreferMountedVols && !dev->vol && dev->is_tape()) { Mmsg(jcr->errmsg, _("3606 JobId=%u prefers mounted drives, but drive %s has no Volume.\n"), jcr->JobId, dev->print_name()); queue_reserve_message(jcr); - Dmsg1(110, "failed: want mounted -- no vol JobId=%u\n", jcr->JobId); + Dmsg1(110, "failed: want mounted -- no vol JobId=%u\n", (uint32_t)jcr->JobId); return 0; /* No volume mounted */ } /* Check for exact Volume name match */ + /* ***FIXME*** use dev->vol.VolumeName */ if (rctx.exact_match && rctx.have_volume && strcmp(dev->VolHdr.VolumeName, rctx.VolumeName) != 0) { Mmsg(jcr->errmsg, _("3607 JobId=%u wants Vol=\"%s\" drive has Vol=\"%s\" on drive %s.\n"), @@ -1102,6 +1104,7 @@ static int can_reserve_drive(DCR *dcr, RCTX &rctx) } /* Check for unused autochanger drive */ + /* ***FIXME*** use !dev->is_busy() */ if (rctx.autochanger_only && dev->num_writers == 0 && dev->VolHdr.VolumeName[0] == 0) { /* Device is available but not yet reserved, reserve it for us */ diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 7b6632d6dc..d49c9ecf5c 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -2,6 +2,8 @@ General: 21Apr07 +kes Extend idea of Prefer Mounted Volumes to mean a volume about + to be mounted. kes Print waiting to reserve a device every 5 mins. 20Apr07 kes Don't call close_part in label.c if tape and relabel.