From 8884cef3b75ba7667624cb4c53702177176ae0b0 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 21 Apr 2007 09:21:14 +0000 Subject: [PATCH] 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 --- bacula/src/stored/reserve.c | 7 +++++-- bacula/technotes-2.1 | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) 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. -- 2.39.5