Yes, such patch would definitely help, I looked quickly your first
patch, and it was reasonable.
If the patch contains more than few lines (not very likely), we will
need also a FLA to include your work.
http://www.bacula.org/en/?page=fla
Hi Eric,
I have modified the code so MaxRunSchedTime will use the new
initial_sched_time when checking to see if a job should be canceled.
I've removed the new directive that I had added. Only 5 lines of code
have been added/modified. Since this is more of a patch than a new
feature, let me know if you'd like this to go through the official bug
database. I can open a bug and attach the patch file to it if you like.
thanks very much,
--tom
--- src/lib/jcr.c.orig 2013-02-19 14:21:35.000000000 -0500
+++ src/lib/jcr.c 2013-03-04 13:09:32.000000000 -0500
@@ -352,6 +352,7 @@
}
jcr->job_end_push.init(1, false);
jcr->sched_time = time(NULL);
+ jcr->initial_sched_time = jcr->sched_time;
jcr->daemon_free_jcr = daemon_free_jcr; /* plug daemon free routine */
jcr->init_mutex();
jcr->inc_use_count();
--- src/jcr.h.orig 2013-02-19 14:21:35.000000000 -0500
+++ src/jcr.h 2013-03-13 10:18:27.000000000 -0400
@@ -249,6 +249,7 @@
volatile int32_t JobStatus; /* ready, running, blocked, terminated */
int32_t JobPriority; /* Job priority */
time_t sched_time; /* job schedule time, i.e. when it
should start */
+ time_t initial_sched_time; /* original sched time before any
reschedules are done */
time_t start_time; /* when job actually started */
time_t run_time; /* used for computing speed */
time_t last_time; /* Last sample time */
@@ -333,7 +334,7 @@
uint32_t ExpectedFiles; /* Expected restore files */
uint32_t MediaId; /* DB record IDs associated with this
job */
uint32_t FileIndex; /* Last FileIndex processed */
- utime_t MaxRunSchedTime; /* max run time in seconds from
Scheduled time*/
+ utime_t MaxRunSchedTime; /* max run time in seconds from Initial
Scheduled time */
POOLMEM *fname; /* name to put into catalog */
POOLMEM *component_fname; /* Component info file name */
FILE *component_fd; /* Component info file desc */
--- src/dird/jobq.c.orig 2013-02-19 14:21:35.000000000 -0500
+++ src/dird/jobq.c 2013-03-04 13:48:21.000000000 -0500
@@ -681,6 +681,7 @@
set_jcr_defaults(njcr, jcr->job);
njcr->reschedule_count = jcr->reschedule_count;
njcr->sched_time = jcr->sched_time;
+ njcr->initial_sched_time = jcr->initial_sched_time;
/*
* Special test here since a Virtual Full gets marked
* as a Full, so we look at the resource record
--- src/dird/job.c.orig 2013-02-19 14:21:35.000000000 -0500
+++ src/dird/job.c 2013-03-13 10:26:19.000000000 -0400
@@ -652,7 +652,7 @@
if (jcr->MaxRunSchedTime == 0 || job_canceled(jcr)) {
return false;
}
- if ((watchdog_time - jcr->sched_time) < jcr->MaxRunSchedTime) {
+ if ((watchdog_time - jcr->initial_sched_time) < jcr->MaxRunSchedTime) {
Dmsg3(200, "Job %p (%s) with MaxRunSchedTime %d not expired\n",
jcr, jcr->Job, jcr->MaxRunSchedTime);
return false;
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel