From: Kern Sibbald Date: Fri, 11 Apr 2008 15:42:17 +0000 (+0000) Subject: Debug code X-Git-Tag: Release-7.0.0~4720 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0c362a3d7bf3b8eb12a0176cc77235b54f35e610;p=bacula%2Fbacula Debug code git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6797 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index 51474e2a13..58ed74db62 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -469,7 +469,8 @@ bool release_device(DCR *dcr) dev->num_writers--; Dmsg1(100, "There are %d writers in release_device\n", dev->num_writers); if (dev->is_labeled()) { - Dmsg0(100, "dir_create_jobmedia_record. Release\n"); + Dmsg2(200, "dir_create_jobmedia. Release vol=%s dev=%s\n", + dev->VolCatInfo.VolCatName, dev->print_name()); if (!dev->at_weot() && !dir_create_jobmedia_record(dcr)) { Jmsg(jcr, M_FATAL, 0, _("Could not create JobMedia record for Volume=\"%s\" Job=%s\n"), dcr->VolCatInfo.VolCatName, jcr->Job); @@ -479,14 +480,15 @@ bool release_device(DCR *dcr) dev->weof(1); write_ansi_ibm_labels(dcr, ANSI_EOF_LABEL, dev->VolHdr.VolumeName); } - if (!dev->num_writers) { /* if no more writers */ - volume_unused(dcr); /* we obviously are not using the volume */ - } if (!dev->at_weot()) { dev->VolCatInfo.VolCatFiles = dev->file; /* set number of files */ /* Note! do volume update before close, which zaps VolCatInfo */ - Dmsg0(100, "dir_update_vol_info. Release0\n"); dir_update_volume_info(dcr, false, false); /* send Volume info to Director */ + Dmsg2(200, "dir_update_vol_info. Release vol=%s dev=%s\n", + dev->VolCatInfo.VolCatName, dev->print_name()); + } + if (!dev->num_writers) { /* if no more writers */ + volume_unused(dcr); /* we obviously are not using the volume */ } } diff --git a/bacula/src/stored/device.c b/bacula/src/stored/device.c index 0d84404ea7..0006cdf6d1 100644 --- a/bacula/src/stored/device.c +++ b/bacula/src/stored/device.c @@ -159,7 +159,7 @@ bool fixup_device_block_write_error(DCR *dcr) /* * Walk through all attached jcrs indicating the volume has changed */ - Dmsg1(100, "Walk attached dcrs. Volume=%s\n", dev->VolCatInfo.VolCatName); + Dmsg1(100, "Notify vol change. Volume=%s\n", dev->VolCatInfo.VolCatName); DCR *mdcr; foreach_dlist(mdcr, dev->attached_dcrs) { JCR *mjcr = mdcr->jcr;