X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=blobdiff_plain;f=create.c;h=af5694c4cba8b4148d1b083b5307fb2240335a29;hp=51583a65fe4910ab4d5d812d48e26d25745f9cd4;hb=6a302c5863fea16e14ec6a4104e92023d8e2e977;hpb=fa21c55adb75551452241369424a146c7acb71a4 diff --git a/create.c b/create.c index 51583a6..af5694c 100644 --- a/create.c +++ b/create.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Andre Noll + * Copyright (C) 2008 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -56,8 +56,7 @@ static int insert_global_bloom(struct stat64 *s, { if (!consider_bloom(s)) return 0; - return bloom_test_and_insert(buf, GLOBAL_BLOOM_BUF_SIZE, - global_bloom_filter); + return bloom_insert(buf, GLOBAL_BLOOM_BUF_SIZE, global_bloom_filter); } static int insert_user_bloom(struct stat64 *s, @@ -65,8 +64,7 @@ static int insert_user_bloom(struct stat64 *s, { if (!consider_bloom(s)) return 0; - return bloom_test_and_insert(buf, USER_BLOOM_BUF_SIZE, - user_bloom_filter); + return bloom_insert(buf, USER_BLOOM_BUF_SIZE, user_bloom_filter); } static int add_directory(char *dirname, uint64_t *dir_num, uint64_t *parent_dir_num, @@ -225,7 +223,7 @@ static void log_bloom_stat(struct bloom *b) NOTICE_LOG("\t%u%% of bits are set\n", percent); if (percent > 50) { WARNING_LOG("results may be unreliable!\n"); - WARNING_LOG("consider incrasing bllom filter size\n"); + WARNING_LOG("consider increasing bloom filter size\n"); } } @@ -258,8 +256,8 @@ int com_create(void) if (!S_ISDIR(statbuf.st_mode)) return -ERRNO_TO_ERROR(ENOTDIR); if (order >= 10 && num > 0) { - bloom_init(order, num, &global_bloom_filter); - bloom_init(order, num, &user_bloom_filter); + global_bloom_filter = bloom_new(order, num); + user_bloom_filter = bloom_new(order, num); } else WARNING_LOG("hard link detection deactivated\n"); device_id = statbuf.st_dev;