dedup: detect and report dedupengine startup failure
- 2 cases to handle
- cannot load the driver
- error at the dedupengine creation time or startup
- the error message is stored in the dedup ressourse
- see regress/tests/dedup-start-fail-test for more
# Conflicts:
# bacula/src/stored/dircmd.c
Author: Eric Bollengier <eric@baculasystems.com>
Date: Fri Nov 15 09:12:29 2019 +0100
cloud: Rename TransferRetentionDays to TransferRetention (expressed as a time)
- remove global variables: dedupengine and bucker_manager
- update protocol SD<->DIR
- extend dedup_dev and BufferedMsgSD to suuport all function
- create "dummy" functions in dev.h
Warning :
- include a dedupengine use counter
- .status storage=XXX dedupengine display all the dedupengine on the SD
instead of the one(s) related to the "device"
dedup: add MaxContainerSize directive to SD ( FIX #1728 )
- this directive must limit the size of the container
- add max_container_size to bacula-sd.conf and to BucketManager
- new method BucketManager::grow0() like grow() but without any lock
- new method BucketManager::add_buckets() that add a bucket
- new method BucketManager::can_grow_more() that tell if a bucket can grow
- allocate the max size (511 entries) for the container table
(this is the maximum for standard 64K header)
- use BucketManager::alloc_block() instead of Bucket::alloc_block() to alloc chunks
BucketManager::alloc_block() will handle the choice of the bucket, extend or
create a new one when required.
- use Bucket::capacity() instead of ba.size
- dedup: link extra container together and keep ba.size < max_container_bidx
. container of the same max_blocksize are linked
. the head is got by BucketManager::choose_bucket()
. the current container is head->current
. they can be iterated up to NULL vi head->current->next
. ba.size is kept < max_container_bidx by grow0()
(I started doing a "runtime" limitation in alloc_block())
. brc32 must use the right size (ba.size,max_container_bidx) at startup
. add_buckets() return a bucket and handle "md_fsmonly"
- extend clone_fsm() to handle extra containers
- extend BucketManager::alloc_block() to keep vacuum_fsm geometry in sync
- add a lock parameter to BucketManager::get_bucket(blockaddr addr, bool lck=true)
- new method DedupEngine::vacuum_mark0() with a lock parameter
- can modifying MaxContainerSize at any time
. containers that are already bigger than the new value will no grow anymore
. container that are smaller than the new value will continue to grow
- add bucketmanager::Check