From: Eric Bollengier Date: Tue, 23 Feb 2021 09:01:38 +0000 (+0100) Subject: Fix Verify job issue with offset stream and compressed blocks X-Git-Tag: Release-11.0.2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c0fbe1b3df9c0239cb8fb559b4391c9cc5cb6a3;p=thirdparty%2Fbacula.git Fix Verify job issue with offset stream and compressed blocks Description: ------------ When a Plugin generates an OFFSET stream and the FileSet uses data compression, a Verify job (level=data) did not handle correctly the offset header in the data stream, resulting the following kind of message: Error: Compressed header version error. Got=0x4f58 want=0x1 --- diff --git a/bacula/src/filed/verify_vol.c b/bacula/src/filed/verify_vol.c index 754c3f4a7..9876ea67e 100644 --- a/bacula/src/filed/verify_vol.c +++ b/bacula/src/filed/verify_vol.c @@ -187,6 +187,7 @@ void v_ctx::skip_sparse_header(char **data, uint32_t *length) *data += OFFSET_FADDR_SIZE; *length -= OFFSET_FADDR_SIZE; + Dmsg0(0, "Skipping SPARSE HEADER\n"); } void v_ctx::check_accurate() @@ -310,7 +311,7 @@ void do_verify_volume(JCR *jcr) goto bail_out; } vctx.stream = vctx.full_stream & STREAMMASK_TYPE; - Dmsg4(30, "Got hdr: FilInx=%d FullStream=%d Stream=%d size=%d.\n", + Dmsg4(0, "Got hdr: FilInx=%d FullStream=%d Stream=%d size=%d.\n", file_index, vctx.full_stream, vctx.stream, size); /* @@ -504,7 +505,8 @@ void do_verify_volume(JCR *jcr) if (vctx.stream == STREAM_SPARSE_DATA || vctx.stream == STREAM_SPARSE_COMPRESSED_DATA - || vctx.stream == STREAM_SPARSE_GZIP_DATA) { + || vctx.stream == STREAM_SPARSE_GZIP_DATA + || vctx.full_stream & STREAM_BIT_OFFSETS) { vctx.skip_sparse_header(&wbuf, &wsize); }