t/dedupe: fixup bloom entry calculation
authorJens Axboe <axboe@fb.com>
Sun, 28 Sep 2014 03:29:03 +0000 (21:29 -0600)
committerJens Axboe <axboe@fb.com>
Sun, 28 Sep 2014 03:29:03 +0000 (21:29 -0600)
With m/n at 8x and with 5 default hashes for blooming, we should
be around ~2% false positive rate max.

Signed-off-by: Jens Axboe <axboe@fb.com>
t/dedupe.c

index 12ede8f0494566017674c97f1295b8c0e6efd372..f9fb8c4a54e35da728bdcf96cafb95f7c7210cf8 100644 (file)
@@ -452,7 +452,7 @@ static int dedupe_check(const char *filename, uint64_t *nextents,
        if (use_bloom) {
                uint64_t bloom_entries;
 
        if (use_bloom) {
                uint64_t bloom_entries;
 
-               bloom_entries = (3 * dev_size ) / (blocksize * 2);
+               bloom_entries = 8 * (dev_size / blocksize);
                bloom = bloom_new(bloom_entries);
        }
 
                bloom = bloom_new(bloom_entries);
        }