From 1de8eb2e591c833a0a8021d2fbeabf1ab9a9c600 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 19 Mar 2004 12:43:04 +0000 Subject: [PATCH] Add sanity check for VolFiles decreasing git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1143 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 22 ++++++++++++++++++++++ bacula/ReleaseNotes | 5 +++++ bacula/src/dird/catreq.c | 12 ++++++++++-- bacula/src/lib/message.c | 4 ++-- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 60157ec77b..3415de833c 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,4 +1,26 @@ +19Mar04 +- Hunt down missing free_locked_jcr() in SD that caused zombies. +- Modify status outputs to be more consistent for zombie checking. +- Add tests to regression script for zombie jobs. +- Set EIO in dev_errno for all error returns when bad data found. This + fixes ERR=Success messages. +- Make error messages all contain ERROR for easy regression testing. +- Add sanity check in DIR for VolFiles becoming smaller. +18Mar04 +- Second cut GTK+ restore GUI. Ready for testing but much more to do. +- Phil reported an sql path length=0 message. This broke saves of + / -- fixed in scan.c +- Fixed seg fault in btape "test" due to missing allocation of dcr. +- Tweaked some btape messages. +- Sort Volume names in Job report according to the order they were + written -- user request. +17Mar04 +- First cut GTK+ restore GUI. +- Applied bsmtp patch supplied by a user. Thanks. +- Made a new split_path_and_filename() subroutine -- in lib/scan.c +15Mar04 +- Fix "typos" in RedHat install-autostart Makefile.in 13Mar04 - Added two tar files that Phil sent for adding slackware support. Thanks Phil and Matt Howard. diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index ce77c6920f..4f83db8686 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -42,6 +42,11 @@ New Commands: Most Significant Changes since 1.32f-4 +- Native Win32 Client -- much faster and does better restores than old + Cygwin Win32 Client. +- Implement Gnome 2.0 restore GUI +- Implement data spooling +- Implement Volume Polling - Add a missing unlock in the jobq handler. - Fix bug where a soft linked file and a directory had the same name by treating the soft link as a directory and putting the entries under diff --git a/bacula/src/dird/catreq.c b/bacula/src/dird/catreq.c index b5ce46a282..b7e89483af 100644 --- a/bacula/src/dird/catreq.c +++ b/bacula/src/dird/catreq.c @@ -176,8 +176,8 @@ void catalog_request(JCR *jcr, BSOCK *bs, char *msg) /* * Request to update Media record. Comes typically at the end - * of a Storage daemon Job Session or when labeling/relabeling a - * Volume. + * of a Storage daemon Job Session, when labeling/relabeling a + * Volume, or when an EOF mark is written. */ } else if (sscanf(bs->msg, Update_media, &Job, &sdmr.VolumeName, &sdmr.VolJobs, &sdmr.VolFiles, &sdmr.VolBlocks, &sdmr.VolBytes, &sdmr.VolMounts, &sdmr.VolErrors, @@ -205,6 +205,14 @@ void catalog_request(JCR *jcr, BSOCK *bs, char *msg) Dmsg2(300, "label=%d labeldate=%d\n", label, mr.LabelDate); if (label || mr.LabelDate == 0) { mr.LabelDate = time(NULL); + } else { + /* + * Insanity check for VolFiles get set to a smaller value + */ + if (sdmr.VolFiles < mr.VolFiles) { + Jmsg(jcr, M_ERROR, 0, _("ERROR!! Volume Files at %u being set to %u. This is probably wrong.\n"), + mr.VolFiles, sdmr.VolFiles); + } } Dmsg2(300, "Update media: BefVolJobs=%u After=%u\n", mr.VolJobs, sdmr.VolJobs); /* Copy updated values to original media record */ diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index a5d49d1bd6..b8b4b004d0 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -893,9 +893,9 @@ e_msg(const char *file, int line, int type, int level, const char *fmt,...) break; case M_ERROR: if (level == -1) /* skip details */ - len = bsnprintf(buf, sizeof(buf), "%s: Error: ", my_name); + len = bsnprintf(buf, sizeof(buf), "%s: ERROR: ", my_name); else - len = bsnprintf(buf, sizeof(buf), "%s: Error in %s:%d ", my_name, file, line); + len = bsnprintf(buf, sizeof(buf), "%s: ERROR in %s:%d ", my_name, file, line); break; case M_WARNING: len = bsnprintf(buf, sizeof(buf), "%s: Warning: ", my_name); -- 2.39.5