- jcr->file_list = tcadbnew();
-//
-// tchdbsetcache(jcr->file_list, 300000);
-// tchdbtune(jcr->file_list,
-// nbfile, /* nb bucket 0.5n to 4n */
-// 6, /* size of element 2^x */
-// 16,
-// 0); /* options like compression */
-//
- jcr->hash_name = get_pool_memory(PM_MESSAGE);
- POOLMEM *temp = get_pool_memory(PM_MESSAGE);
-
- if (nbfile > 500000) {
- make_unique_filename(&jcr->hash_name, jcr->JobId, "accurate");
- pm_strcat(jcr->hash_name, ".tcb");
- Mmsg(temp, "%s#bnum=%i#mode=e#opts=l",
- jcr->hash_name, nbfile*4);
- Dmsg1(dbglvl, "Doing accurate hash on disk %s\n", jcr->hash_name);
- } else {
- Dmsg0(dbglvl, "Doing accurate hash on memory\n");
- pm_strcpy(jcr->hash_name, "*");
- pm_strcpy(temp, "*");
- }
-
- if(!tcadbopen(jcr->file_list, jcr->hash_name)){
- Jmsg(jcr, M_ERROR, 1, _("Can't open accurate hash disk\n"));
- Jmsg(jcr, M_INFO, 1, _("Disabling accurate mode\n"));
- tcadbdel(jcr->file_list);
- jcr->file_list = NULL;
- jcr->accurate = false;
- }
- free_pool_memory(temp);
- return jcr->file_list != NULL;