A couple of minor cleanups.
This commit is contained in:
parent
b2cbf0699e
commit
393ced991a
3 changed files with 3 additions and 2 deletions
|
@ -138,7 +138,7 @@ init_sha256(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check is either the given checksum name or id is valid and
|
* Check if either the given checksum name or id is valid and
|
||||||
* return it's properties.
|
* return it's properties.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
|
|
|
@ -179,7 +179,7 @@ create_dedupe_context(uint64_t chunksize, uint64_t real_chunksize, int rab_blk_s
|
||||||
|
|
||||||
ctx->fixed_flag = fixed_flag;
|
ctx->fixed_flag = fixed_flag;
|
||||||
ctx->rabin_break_patt = 0;
|
ctx->rabin_break_patt = 0;
|
||||||
ctx->rabin_poly_avg_block_size = 1 << (rab_blk_sz + RAB_BLK_MIN_BITS);
|
ctx->rabin_poly_avg_block_size = RAB_BLK_AVG_SZ(rab_blk_sz);
|
||||||
ctx->rabin_avg_block_mask = RAB_BLK_MASK;
|
ctx->rabin_avg_block_mask = RAB_BLK_MASK;
|
||||||
ctx->rabin_poly_min_block_size = dedupe_min_blksz(rab_blk_sz);
|
ctx->rabin_poly_min_block_size = dedupe_min_blksz(rab_blk_sz);
|
||||||
ctx->delta_flag = 0;
|
ctx->delta_flag = 0;
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
#define RAB_POLYNOMIAL_MAX_WIN_SIZE 64
|
#define RAB_POLYNOMIAL_MAX_WIN_SIZE 64
|
||||||
#define RAB_POLYNOMIAL_MAX_BLOCK_SIZE (128 * 1024)
|
#define RAB_POLYNOMIAL_MAX_BLOCK_SIZE (128 * 1024)
|
||||||
#define RAB_BLK_MASK (((1 << RAB_BLK_MIN_BITS) - 1) >> 1)
|
#define RAB_BLK_MASK (((1 << RAB_BLK_MIN_BITS) - 1) >> 1)
|
||||||
|
#define RAB_BLK_AVG_SZ(x) (1 << ((x) + RAB_BLK_MIN_BITS))
|
||||||
|
|
||||||
// Minimum practical chunk size when doing dedup
|
// Minimum practical chunk size when doing dedup
|
||||||
#define RAB_MIN_CHUNK_SIZE (1048576L)
|
#define RAB_MIN_CHUNK_SIZE (1048576L)
|
||||||
|
|
Loading…
Reference in a new issue