From 77ec7c2e7e4d8306a14cfcf2bddff637f28d9dc7 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 6 Jul 2008 13:06:15 +0000 Subject: [PATCH] kes Remove sleep at end of ./bacula kes Clear hash packet for hardlinked files correctly. This corrects a long standing bug where hardlinked files selected individually would occasionally not be restored. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7325 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/scripts/bacula.in | 3 +-- bacula/src/findlib/find_one.c | 10 ++++++---- bacula/src/version.h | 6 +++--- bacula/technotes-2.4 | 5 +++++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/bacula/scripts/bacula.in b/bacula/scripts/bacula.in index 8010035a59..8a4f91eb4c 100755 --- a/bacula/scripts/bacula.in +++ b/bacula/scripts/bacula.in @@ -27,12 +27,11 @@ case "$1" in [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2 [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2 [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2 - echo - sleep 6 ;; restart) $0 stop + sleep 2 $0 start ;; diff --git a/bacula/src/findlib/find_one.c b/bacula/src/findlib/find_one.c index 7837748ead..d6cb7995b1 100644 --- a/bacula/src/findlib/find_one.c +++ b/bacula/src/findlib/find_one.c @@ -397,6 +397,7 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, ff_pkt->link = lp->name; ff_pkt->type = FT_LNKSAVED; /* Handle link, file already saved */ ff_pkt->LinkFI = lp->FileIndex; + ff_pkt->linked = NULL; return handle_file(ff_pkt, pkt, top_level); } @@ -405,9 +406,10 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, lp = (struct f_link *)bmalloc(sizeof(struct f_link) + len); lp->ino = ff_pkt->statp.st_ino; lp->dev = ff_pkt->statp.st_dev; + lp->FileIndex = 0; /* set later */ bstrncpy(lp->name, fname, len); - lp->next = ff_pkt->linkhash[linkhash]; - ff_pkt->linkhash[linkhash] = lp; + lp->next = ff_pkt->linkhash[linkhash]; + ff_pkt->linkhash[linkhash] = lp; ff_pkt->linked = lp; /* mark saved link */ } else { ff_pkt->linked = NULL; @@ -685,8 +687,8 @@ find_one_file(JCR *jcr, FF_PKT *ff_pkt, * On FreeBSD, all block devices are character devices, so * to be able to read a raw disk, we need the check for * a character device. -    * crw-r-----  1 root  operator  - 116, 0x00040002 Jun  9 19:32 /dev/ad0s3 -    * crw-r-----  1 root  operator  - 116, 0x00040002 Jun  9 19:32 /dev/rad0s3 + * crw-r----- 1 root operator - 116, 0x00040002 Jun 9 19:32 /dev/ad0s3 + * crw-r----- 1 root operator - 116, 0x00040002 Jun 9 19:32 /dev/rad0s3 */ if (top_level && (S_ISBLK(ff_pkt->statp.st_mode) || S_ISCHR(ff_pkt->statp.st_mode))) { #else diff --git a/bacula/src/version.h b/bacula/src/version.h index d2f5499ef4..3b436770a6 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,9 +3,9 @@ */ #undef VERSION -#define VERSION "2.4.1-b2" -#define BDATE "04 July 2008" -#define LSMDATE "04Jul08" +#define VERSION "2.4.1-b3" +#define BDATE "06 July 2008" +#define LSMDATE "06Jul08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index ae6d9c3f73..decd1de5e7 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -2,6 +2,11 @@ General: +06Jul08 +kes Remove sleep at end of ./bacula +kes Clear hash packet for hardlinked files correctly. This corrects + a long standing bug where hardlinked files selected individually + would occasionally not be restored. 05Jul08 kes Apply Eric's patch to ensure that autoprune does not return a Volume not in the autochanger unless requested to do so. -- 2.39.5