From e4117f559909c38933f531e0de39a77cfbad0a78 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 23 Apr 2010 10:59:42 +0200 Subject: [PATCH] Remove pool zap code that breaks 2drive-concurrent-test --- bacula/src/stored/reserve.c | 17 ++++++++--------- bacula/src/stored/vol_mgr.c | 4 ---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/bacula/src/stored/reserve.c b/bacula/src/stored/reserve.c index 40e0f2f275..0411704e31 100644 --- a/bacula/src/stored/reserve.c +++ b/bacula/src/stored/reserve.c @@ -828,7 +828,7 @@ static bool reserve_device_for_append(DCR *dcr, RCTX &rctx) if (dev->can_read()) { Mmsg(jcr->errmsg, _("3603 JobId=%u device %s is busy reading.\n"), jcr->JobId, dev->print_name()); - Dmsg1(dbglvl, "%s", jcr->errmsg); + Dmsg1(dbglvl, "Failed: %s", jcr->errmsg); queue_reserve_message(jcr); goto bail_out; } @@ -837,7 +837,7 @@ static bool reserve_device_for_append(DCR *dcr, RCTX &rctx) if (dev->is_device_unmounted()) { Mmsg(jcr->errmsg, _("3604 JobId=%u device %s is BLOCKED due to user unmount.\n"), jcr->JobId, dev->print_name()); - Dmsg1(dbglvl, "%s", jcr->errmsg); + Dmsg1(dbglvl, "Failed: %s", jcr->errmsg); queue_reserve_message(jcr); goto bail_out; } @@ -875,9 +875,8 @@ static int is_pool_ok(DCR *dcr) "3608 JobId=%u wants Pool=\"%s\" but have Pool=\"%s\" nreserve=%d on drive %s.\n"), (uint32_t)jcr->JobId, dcr->pool_name, dev->pool_name, dev->num_reserved(), dev->print_name()); + Dmsg1(dbglvl, "Failed: %s", jcr->errmsg); queue_reserve_message(jcr); - Dmsg2(dbglvl, "failed: busy num_writers=0, reserved, pool=%s wanted=%s\n", - dev->pool_name, dcr->pool_name); } return 0; } @@ -898,8 +897,8 @@ static bool is_max_jobs_ok(DCR *dcr) /* Max Concurrent Jobs depassed or already reserved */ Mmsg(jcr->errmsg, _("3609 JobId=%u Max concurrent jobs exceeded on drive %s.\n"), (uint32_t)jcr->JobId, dev->print_name()); + Dmsg1(dbglvl, "Failed: %s", jcr->errmsg); queue_reserve_message(jcr); - Dmsg1(dbglvl, "reserve dev failed: %s", jcr->errmsg); return false; } if (strcmp(dcr->VolCatInfo.VolCatStatus, "Recycle") == 0) { @@ -910,8 +909,8 @@ static bool is_max_jobs_ok(DCR *dcr) /* Max Job Vols depassed or already reserved */ Mmsg(jcr->errmsg, _("3610 JobId=%u Volume max jobs exceeded on drive %s.\n"), (uint32_t)jcr->JobId, dev->print_name()); - queue_reserve_message(jcr); Dmsg1(dbglvl, "reserve dev failed: %s", jcr->errmsg); + queue_reserve_message(jcr); return false; /* wait */ } return true; @@ -960,9 +959,9 @@ static int can_reserve_drive(DCR *dcr, RCTX &rctx) } else { Dmsg1(dbglvl, "not low use num_writers=%d\n", dev->num_writers+dev->num_reserved()); } - Dmsg0(dbglvl, "failed: !prefMnt && busy.\n"); Mmsg(jcr->errmsg, _("3605 JobId=%u wants free drive but device %s is busy.\n"), jcr->JobId, dev->print_name()); + Dmsg1(dbglvl, "Failed: %s", jcr->errmsg); queue_reserve_message(jcr); return 0; } @@ -971,8 +970,8 @@ static int can_reserve_drive(DCR *dcr, RCTX &rctx) 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()); + Dmsg1(dbglvl, "Failed: %s", jcr->errmsg); queue_reserve_message(jcr); - Dmsg0(dbglvl, "failed: want mounted -- no vol\n"); return 0; /* No volume mounted */ } @@ -1056,7 +1055,7 @@ static int can_reserve_drive(DCR *dcr, RCTX &rctx) Mmsg(jcr->errmsg, _("3911 JobId=%u failed reserve drive %s.\n"), jcr->JobId, dev->print_name()); queue_reserve_message(jcr); - Dmsg1(dbglvl, "failed: No reserve %s\n", dev->print_name()); + Dmsg1(dbglvl, "Failed: No reserve %s\n", dev->print_name()); return 0; } diff --git a/bacula/src/stored/vol_mgr.c b/bacula/src/stored/vol_mgr.c index e15e6c0183..5edd8aa807 100644 --- a/bacula/src/stored/vol_mgr.c +++ b/bacula/src/stored/vol_mgr.c @@ -621,10 +621,6 @@ bool free_volume(DEVICE *dev) if (!vol->is_swapping()) { Dmsg1(dbglvl, "=== clear in_use vol=%s\n", vol->vol_name); dev->vol = NULL; - if (!dev->num_reserved()) { - dev->pool_name[0] = 0; - dev->pool_type[0] = 0; - } vol_list->remove(vol); Dmsg2(dbglvl, "=== remove volume %s dev=%s\n", vol->vol_name, dev->print_name()); free_vol_item(vol); -- 2.39.5