From 80b7d4d007b8bf4a4aee71c7e2a28eb091c6d05b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 4 May 2003 21:10:25 +0000 Subject: [PATCH] Remove debug print, make skeleton of HB restore and verify volume git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@488 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 5 +++-- bacula/src/filed/heartbeat.c | 15 ++++++++++++++- bacula/src/filed/job.c | 6 +++++- bacula/src/filed/protos.h | 2 ++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index e9224e573a..e1c9fd1959 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -15,7 +15,9 @@ Testing to do: (painful) - blocksize recognition code. - multiple simultaneous Volumes -For 1.30a release: +For 1.31 release: +- Fix Dir heartbeat in restore and verify vol. Be sure to make + bnet_recv() ignore BNET_HEARTBEAT. - Examine Bare Metal restore problem. - Test multiple simultaneous Volumes - Document FInclude ... @@ -25,7 +27,6 @@ For 1.30a release: - Figure out how to use ssh or stunnel to protect Bacula communications. -After 1.30: - Fix command prompt in gnome-console by checking on Ready. - Implement HEART_BEAT while SD waiting for tapes. - Include RunBeforeJob and RunAfterJob output in the message diff --git a/bacula/src/filed/heartbeat.c b/bacula/src/filed/heartbeat.c index cb090ae642..ba7841f626 100644 --- a/bacula/src/filed/heartbeat.c +++ b/bacula/src/filed/heartbeat.c @@ -67,7 +67,7 @@ static void *heartbeat_thread(void *arg) } if (n == 1) { /* input waiting */ bnet_recv(sd); /* read it -- probably heartbeat from sd */ - Dmsg1(000, "Got %d from SD\n", sd->msglen); +/* Dmsg1(000, "Got %d from SD\n", sd->msglen); */ } } bnet_close(sd); @@ -99,3 +99,16 @@ void stop_heartbeat_monitor(JCR *jcr) bmicrosleep(0, 20); } } + +/* + * Same as above but we don't listen to the SD + */ +void start_dir_heartbeat(JCR *jcr) +{ + /* ***FIXME*** implement */ +} + +void stop_dir_heartbeat(JCR *jcr) +{ + /* ***FIXME*** implement */ +} diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 4f1ff4552a..020e49bac4 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -668,7 +668,9 @@ static int verify_cmd(JCR *jcr) if (!open_sd_read_session(jcr)) { return 0; } + start_dir_heartbeat(jcr); do_verify_volume(jcr); + stop_dir_heartbeat(jcr); /* * Send Close session command to Storage daemon */ @@ -744,8 +746,10 @@ static int restore_cmd(JCR *jcr) /* * Do restore of files and data */ + start_dir_heartbeat(jcr); do_restore(jcr); - + stop_dir_heartbeat(jcr); + set_jcr_job_status(jcr, JS_Terminated); if (jcr->JobStatus != JS_Terminated) { bnet_suppress_error_messages(sd, 1); diff --git a/bacula/src/filed/protos.h b/bacula/src/filed/protos.h index 0148ff0785..a2feeaf26d 100644 --- a/bacula/src/filed/protos.h +++ b/bacula/src/filed/protos.h @@ -33,3 +33,5 @@ extern int make_estimate(JCR *jcr); /* From heartbeat.c */ void start_heartbeat_monitor(JCR *jcr); void stop_heartbeat_monitor(JCR *jcr); +void start_dir_heartbeat(JCR *jcr); +void stop_dir_heartbeat(JCR *jcr); -- 2.39.5