case JS_WaitPriority:
msg = _("is waiting for higher priority jobs to finish");
break;
+ case JS_DataCommitting:
+ msg = _("SD committing Data");
+ break;
+ case JS_DataDespooling:
+ msg = _("SD despooling Data");
+ break;
case JS_AttrDespooling:
msg = _("SD despooling Attributes");
break;
}
msg = emsg;
break;
+ case JS_DataCommitting:
+ msg = _("SD committing Data");
+ break;
+ case JS_DataDespooling:
+ msg = _("SD despooling Data");
+ break;
case JS_AttrDespooling:
msg = _("SD despooling Attributes");
break;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
#define JS_WaitPriority 'p' /* Waiting for higher priority jobs to finish */
#define JS_AttrDespooling 'a' /* SD despooling attributes */
#define JS_AttrInserting 'i' /* Doing batch insert file records */
+#define JS_DataDespooling 'l' /* Doing data despooling */
+#define JS_DataCommitting 'L' /* Committing data (last despool) */
/* Migration selection types */
enum {
case JS_WaitPriority:
jobstat = _("Waiting on Priority");
break;
+ case JS_DataCommitting:
+ jobstat = _("SD committing Data");
+ break;
+ case JS_DataDespooling:
+ jobstat = _("SD despooling Data");
+ break;
case JS_AttrDespooling:
jobstat = _("SD despooling Attributes");
break;
* has failed, since the device is not in read mode and
* there are no writers. It was probably reserved.
*/
+ volume_unused(dcr);
}
/* If no writers, close if file or !CAP_ALWAYS_OPEN */
Pmsg2(000, _("End of Volume \"%s\" %d records.\n"), dcr->VolumeName,
quickie_count);
+ volume_unused(dcr); /* release current volume */
if (LastBlock != block->BlockNumber) {
VolBytes += block->block_len;
}
if (!dev->is_open()) {
dev->clear_volhdr();
}
+ volume_unused(dcr); /* no longer using volume */
give_back_device_lock(dev, &hold);
return;
}
return true;
bail_out:
+ volume_unused(dcr);
dev->clear_volhdr();
dev->clear_append(); /* remove append since this is PRE_LABEL */
return false;
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2002-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2002-2008 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
DEVICE *dev = dcr->dev;
JCR *jcr = dcr->jcr;
Dmsg2(90, "NumReadVolumes=%d CurReadVolume=%d\n", jcr->NumReadVolumes, jcr->CurReadVolume);
+
+ volume_unused(dcr); /* release current volume */
/*
* End Of Tape -- mount next Volume (if another specified)
*/
Dmsg3(dbglvl, "=== mark released vol=%s num_writers=%d reserved=%d\n",
dev->vol->vol_name, dev->num_writers, dev->reserved_device);
dev->vol->released = true;
- if (dev->is_tape() || dev->is_autochanger()) {
+ if (dev->is_tape()) { // || dev->is_autochanger()) {
return true;
} else {
/*
dcr->dev_name, dcr->media_type, dcr->pool_name, ok);
Dmsg3(dbglvl, "Vol=%s num_writers=%d, have_vol=%d\n",
rctx.VolumeName, dcr->dev->num_writers, rctx.have_volume);
- if (!rctx.have_volume) {
+ if (rctx.have_volume) {
+ if (reserve_volume(dcr, rctx.VolumeName)) {
+ Dmsg1(dbglvl, "Reserved vol=%s\n", rctx.VolumeName);
+ } else {
+ Dmsg1(dbglvl, "Could not reserve vol=%s\n", rctx.VolumeName);
+ goto bail_out;
+ }
+ } else {
dcr->any_volume = true;
Dmsg0(dbglvl, "no vol, call find_next_appendable_vol.\n");
if (dir_find_next_appendable_volume(dcr)) {
if (dcr->volume_in_use && !rctx.PreferMountedVols) {
rctx.PreferMountedVols = true;
if (dcr->VolumeName[0]) {
- volume_unused(dcr);
+ unreserve_device(dcr);
}
goto bail_out;
}
/*
* Note. Under some circumstances, the Director can hand us
- * a Volume name that is no the same as the one on the current
+ * a Volume name that is not the same as the one on the current
* drive, and in that case, the call above to find the next
* volume will fail because in attempting to reserve the Volume
* the code will realize that we already have a tape mounted,
*/
if (dcr->dev->num_writers != 0) {
if (dcr->VolumeName[0]) {
- volume_unused(dcr);
+ unreserve_device(dcr);
}
goto bail_out;
}
bail_out:
rctx.have_volume = false;
rctx.VolumeName[0] = 0;
-// free_dcr(dcr);
Dmsg0(dbglvl, "Not OK.\n");
return 0;
}
Jmsg(jcr, M_INFO, 0, _("Committing spooled data to Volume \"%s\". Despooling %s bytes ...\n"),
jcr->dcr->VolumeName,
edit_uint64_with_commas(jcr->dcr->job_spool_size, ec1));
+ set_jcr_job_status(jcr, JS_DataCommitting);
} else {
Jmsg(jcr, M_INFO, 0, _("Writing spooled data to Volume. Despooling %s bytes ...\n"),
edit_uint64_with_commas(jcr->dcr->job_spool_size, ec1));
+ set_jcr_job_status(jcr, JS_DataDespooling);
}
+ set_jcr_job_status(jcr, JS_DataDespooling);
+ dir_send_job_status(jcr);
dcr->despool_wait = true;
dcr->spooling = false;
/*
free(rdev);
dcr->spooling = true; /* turn on spooling again */
dcr->despooling = false;
+
/*
* We are done, so unblock the device, but if we have done a
* commit, leave it locked so that the job cleanup does not
if (!commit) {
dcr->dunlock();
}
+ set_jcr_job_status(jcr, JS_Running);
+ dir_send_job_status(jcr);
return ok;
}
#undef VERSION
#define VERSION "2.3.8"
-#define BDATE "06 January 2008"
-#define LSMDATE "06Jan08"
+#define BDATE "10 January 2008"
+#define LSMDATE "10Jan08"
-#define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
+#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
/*
Technical notes on version 2.3
General:
+10Jan08
+kes Add DataDespooling and DataCommitting status (committing is
+ the last despooling).
+kes Finish implementation of new reservations code noted below.
08Jan08
+kes Fix bsnprintf for float point numbers. I broke recently when
+ parameterizing some variables. This fixes bug #1036.
kes Undo recent reservations changes ... will apply them later
when they work better.
-kes Fix bsnprintf for float point numbers. I broke recently when
- parameterizing some variables.
06Jan08
ebl Fixes #1034 which cause mysql to hang the connection after 8h
ebl Change default statistics target of filename.name and path.path
with JobDefs.
ebl Fixes bug #897 and bug #1005 where bacula doesn't display runscript
output in error.
+
+Release Version 2.2.7
24Dec07
kes Add new free_tls() entry point so that Win32 builds.
kes Fix compile warning in src/lib/util.c