From bceda4f904c9f74986e6cc97d1781287761237d0 Mon Sep 17 00:00:00 2001 From: Michal Rakowski Date: Wed, 4 Aug 2021 12:29:38 +0200 Subject: [PATCH] Fix #6119 About listing files being verified --- bacula/src/filed/verify.c | 2 ++ bacula/src/filed/verify_vol.c | 2 ++ bacula/src/lib/message.h | 5 +++-- bacula/src/lib/parse_conf.c | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bacula/src/filed/verify.c b/bacula/src/filed/verify.c index c2aabf40c..4112546c3 100644 --- a/bacula/src/filed/verify.c +++ b/bacula/src/filed/verify.c @@ -83,6 +83,8 @@ static int verify_file(JCR *jcr, FF_PKT *ff_pkt, bool top_level) return 0; } + Jmsg(jcr, M_VERIFIED, 0, "Veryfying: %s\n", ff_pkt->fname); + dir = jcr->dir_bsock; jcr->num_files_examined++; /* bump total file count */ diff --git a/bacula/src/filed/verify_vol.c b/bacula/src/filed/verify_vol.c index 0fc5a4d8e..a8b516e53 100644 --- a/bacula/src/filed/verify_vol.c +++ b/bacula/src/filed/verify_vol.c @@ -357,6 +357,8 @@ void do_verify_volume(JCR *jcr) attr->data_stream = decode_stat(attr->attr, &attr->statp, sizeof(attr->statp), &attr->LinkFI); + Jmsg(jcr, M_VERIFIED, 0, "Veryfying: %s\n", attr->fname); + jcr->lock(); jcr->JobFiles++; jcr->num_files_examined++; diff --git a/bacula/src/lib/message.h b/bacula/src/lib/message.h index 38dbb990b..e3a966ae6 100644 --- a/bacula/src/lib/message.h +++ b/bacula/src/lib/message.h @@ -94,10 +94,11 @@ enum { M_RESTORED, /* ls -l of restored files */ M_SECURITY, /* security violation */ M_ALERT, /* tape alert messages */ - M_VOLMGMT /* Volume management messages */ + M_VOLMGMT, /* Volume management messages */ + M_VERIFIED /* Verify job messages */ }; -#define M_MAX M_VOLMGMT /* keep this updated ! */ +#define M_MAX M_VERIFIED /* keep this updated ! */ #define M_ALL M_MAX+1 /* We cannot store more than this amount of custom events */ diff --git a/bacula/src/lib/parse_conf.c b/bacula/src/lib/parse_conf.c index 89f6631b3..d4b7580e0 100644 --- a/bacula/src/lib/parse_conf.c +++ b/bacula/src/lib/parse_conf.c @@ -153,6 +153,7 @@ s_kw msg_types[] = { {"Alert", M_ALERT}, {"VolMgmt", M_VOLMGMT}, {"ErrorTerm", M_ERROR_TERM}, + {"Verified", M_VERIFIED}, {"All", M_MAX+1}, {NULL, 0} }; -- 2.47.3