]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/testing/accurate-db.patch
ebl More tests
[bacula/bacula] / bacula / patches / testing / accurate-db.patch
1 Index: src/filed/accurate.c
2 ===================================================================
3 --- src/filed/accurate.c        (révision 7351)
4 +++ src/filed/accurate.c        (copie de travail)
5 @@ -32,193 +32,311 @@
6  
7  #include "bacula.h"
8  #include "filed.h"
9 +#include "lib/htable.h"
10 +static int dbglvl=500;
11  
12 -static int dbglvl=200;
13 +#ifdef USE_DB
14 +#include <db.h>
15  
16 -typedef struct PrivateCurFile {
17 -#ifndef USE_TCADB
18 -   hlink link;
19 -#endif
20 -   char *fname;                        /* not stored with tchdb mode */
21 -   time_t ctime;
22 -   time_t mtime;
23 -   bool seen;
24 -} CurFile;
25 -
26 -#ifdef USE_TCADB
27 -static void realfree(void *p); /* used by tokyo code */
28 -
29  /*
30 - * Update hash element seen=1
31 + * This backend uses DB Berkeley
32   */
33 -static bool accurate_mark_file_as_seen(JCR *jcr, CurFile *elt)
34 +class AccurateBackendDB : public AccurateBackend
35  {
36 -   bool ret=true;
37 +public:
38 +   ~AccurateBackendDB() { destroy(); }
39 +   bool init(JCR *jcr, int nb_elt);
40 +   void destroy();
41  
42 -   elt->seen = 1;
43 -   if (!tcadbput(jcr->file_list, 
44 -                elt->fname, strlen(elt->fname)+1, 
45 -                elt, sizeof(CurFile)))
46 -   { /* TODO: disabling accurate mode ?  */
47 -      Jmsg(jcr, M_ERROR, 1, _("Can't update accurate hash disk\n"));
48 -      ret = false;
49 +   bool insert(JCR *jcr, char *key, CurFile *item);
50 +   bool lookup(JCR *jcr, char *key, CurFile *item);
51 +
52 +   bool mark_as_seen(JCR *jcr, char *key, CurFile *item);
53 +
54 +   CurFile *first(CurFile *elt);
55 +   CurFile *next();
56 +   void finish();
57 +private:
58 +   DB *db;                      /* DB object */
59 +   DB_ENV *dbenv;               /* DB Env object */
60 +   DBC *cursorp;                /* DB cursor  */
61 +   DBT dbkey;
62 +   DBT dbdata;
63 +   POOLMEM *hash_name;          /* file name for hash */
64 +   bool first_pass;
65 +};
66 +
67 +void AccurateBackendDB::destroy()
68 +{
69 +   /* cleanup walk cursor if any */
70 +   if (cursorp) {
71 +      cursorp->c_close(cursorp);
72 +      cursorp = NULL;
73     }
74 -
75 -   return ret;
76 +   if (db) {
77 +      db->close(db, DB_NOSYNC);
78 +      db = NULL;
79 +   }
80 +   if (dbenv) {
81 +      dbenv->dbremove(dbenv, NULL, hash_name, NULL, 0);
82 +      dbenv->close(dbenv, 0);
83 +      dbenv = NULL;
84 +   }
85 +   if (hash_name) {
86 +      unlink(hash_name);        /* remove the hash on disk */
87 +      free_pool_memory(hash_name);
88 +      hash_name = NULL;
89 +   }
90  }
91  
92 -static bool accurate_lookup(JCR *jcr, char *fname, CurFile *ret)
93 +bool AccurateBackendDB::init(JCR *jcr, int nb_elt)
94  {
95 -   bool found=false;
96 -   ret->seen = 0;
97 -   int size;
98 -   CurFile *elt;
99 +   int ret;
100 +   
101 +   Dmsg0(dbglvl, "init DB accurate backend\n");
102  
103 -   elt = (CurFile*)tcadbget(jcr->file_list, 
104 -                           fname, strlen(fname)+1, &size);
105 -   if (elt)
106 +   if ((ret = db_env_create(&dbenv, 0)) != 0) {
107 +      Jmsg(jcr, M_ERROR, 1, _("Can't open initialize hash disk ERR=%i\n"), ret);
108 +      return false;
109 +   }
110 +
111 +   dbenv->set_cachesize(dbenv, 0, 256 * 1024 * 1024, 0);
112 +   dbenv->set_errfile(dbenv, stderr);
113 +   dbenv->set_errpfx(dbenv, "hash");
114 +   
115 +   int flags = DB_PRIVATE | DB_INIT_MPOOL | DB_CREATE | DB_THREAD;
116 +   if ((ret = dbenv->open(dbenv, working_directory, flags, 0)) != 0) {
117 +      destroy();
118 +      Jmsg(jcr, M_ERROR, 1, _("Can't open initialize hash disk ERR=%i\n"), ret);
119 +      return false;
120 +   }
121 +
122 +   dbenv->set_flags(dbenv, DB_TXN_NOSYNC, 1);
123 +   
124 +   if ((ret = db_create(&db, dbenv, 0)) != 0) {
125 +      destroy();
126 +      Jmsg(jcr, M_ERROR, 1, _("Can't open accurate hash disk ERR=%i\n"), ret);
127 +      return false;
128 +   }
129 +
130 +   hash_name  = get_pool_memory(PM_MESSAGE);
131 +   make_unique_filename(&hash_name, jcr->JobId, "accurate");
132 +
133 +   if ((ret = db->open(db,
134 +                       NULL, hash_name, NULL, 
135 +                       DB_BTREE, DB_CREATE, 0600)) != 0)
136     {
137 -      /* TODO: don't malloc/free results */
138 -      found = true;
139 -      elt->fname = fname;
140 -      memcpy(ret, elt, sizeof(CurFile));
141 -      realfree(elt);
142 -//    Dmsg1(dbglvl, "lookup <%s> ok\n", fname);
143 +      destroy();
144 +      Jmsg(jcr, M_ERROR, 1, _("Can't setup hash disk ERR=%i\n"), ret);
145 +      return false;
146     }
147 -   return found;
148 +   
149 +   first_pass=0;
150 +
151 +   return true;
152  }
153  
154 -/* Create tokyo dbm hash file 
155 - * If something goes wrong, we cancel accurate mode.
156 - */
157 -static bool accurate_init(JCR *jcr, int nbfile)
158 +/* Just update the element->seen to know if we have seen it */
159 +bool AccurateBackendDB::mark_as_seen(JCR *jcr, char *key, CurFile *item)
160  {
161 -   jcr->file_list = tcadbnew();
162 -//
163 -//   tchdbsetcache(jcr->file_list, 300000);
164 -//   tchdbtune(jcr->file_list,
165 -//          nbfile,            /* nb bucket 0.5n to 4n */
166 -//          6,                 /* size of element 2^x */
167 -//          16,
168 -//          0);                /* options like compression */
169 -//
170 -   jcr->hash_name  = get_pool_memory(PM_MESSAGE);
171 -   POOLMEM *temp = get_pool_memory(PM_MESSAGE);
172 +   item->seen = 1;
173 +   return insert(jcr, key, item);
174 +}
175  
176 -   if (nbfile > 500000) {
177 -      make_unique_filename(&jcr->hash_name, jcr->JobId, "accurate");
178 -      pm_strcat(jcr->hash_name, ".tcb");
179 -      Mmsg(temp, "%s#bnum=%i#mode=e#opts=l",
180 -          jcr->hash_name, nbfile*4); 
181 -      Dmsg1(dbglvl, "Doing accurate hash on disk %s\n", jcr->hash_name);
182 -   } else {
183 -      Dmsg0(dbglvl, "Doing accurate hash on memory\n");
184 -      pm_strcpy(jcr->hash_name, "*");
185 -      pm_strcpy(temp, "*");
186 +/* insert/replace */
187 +bool AccurateBackendDB::insert(JCR *jcr, char *key, CurFile *item)
188 +{
189 +   int ret;
190 +   memset(&dbkey, 0, sizeof(DBT));
191 +   memset(&dbdata, 0, sizeof(DBT));
192 +   dbkey.data = key;
193 +   dbkey.size = strlen(key)+1;
194 +   dbdata.data = item;
195 +   dbdata.size = sizeof(CurFile);
196 +   if ((ret = db->put(db, NULL, &dbkey, &dbdata, 0))) {
197 +      Jmsg(jcr, M_ERROR, 1, _("Can't update accurate hash disk ERR=%i\n"), ret);
198 +      return false;
199     }
200 +   return true;
201 +}
202 +
203 +bool AccurateBackendDB::lookup(JCR *jcr, char *key, CurFile *item)
204 +{
205 +   int ret=false;
206 +
207 +   /* Zero out the DBTs before using them. */
208 +   memset(&dbkey, 0, sizeof(DBT));
209 +   memset(&dbdata, 0, sizeof(DBT));
210 +
211 +   dbkey.data = key;
212 +   dbkey.size = strlen(key)+1;
213     
214 -   if(!tcadbopen(jcr->file_list, jcr->hash_name)){
215 -      Jmsg(jcr, M_ERROR, 1, _("Can't open accurate hash disk\n"));
216 -      Jmsg(jcr, M_INFO, 1, _("Disabling accurate mode\n"));
217 -      tcadbdel(jcr->file_list);
218 -      jcr->file_list = NULL;
219 -      jcr->accurate = false;
220 +   dbdata.data = item;
221 +   dbdata.ulen = sizeof(CurFile);
222 +   dbdata.flags = DB_DBT_USERMEM;
223 +
224 +   if (db->get(db, NULL, &dbkey, &dbdata, 0) == 0) {
225 +      ret=true;
226     }
227 -   free_pool_memory(temp);
228 -   return jcr->file_list != NULL;
229 +   item->fname = key;
230 +   return ret;
231  }
232  
233 -/* This function is called at the end of backup
234 - * We walk over all hash disk element, and we check
235 - * for elt.seen.
236 +/*
237 + * We use user memory to copy data
238   */
239 -bool accurate_send_deleted_list(JCR *jcr)
240 +CurFile *AccurateBackendDB::first(CurFile *elt)
241  {
242 -   char *key;
243 +   /* Zero out the DBTs before using them. */
244 +   memset(&dbkey, 0, sizeof(DBT));
245 +   memset(&dbdata, 0, sizeof(DBT));
246 +   dbdata.data = elt;
247 +   dbdata.ulen = sizeof(CurFile);
248 +   dbdata.flags = DB_DBT_USERMEM;
249 +   db->cursor(db, NULL, &cursorp, 0); 
250 +   return next();
251 +}
252 +
253 +CurFile *AccurateBackendDB::next()
254 +{
255     CurFile *elt;
256 -   int size;
257 -   FF_PKT *ff_pkt;
258 -   int stream = STREAM_UNIX_ATTRIBUTES;
259 -
260 -   if (!jcr->accurate || jcr->JobLevel == L_FULL) {
261 -      goto bail_out;
262 +   if (cursorp->c_get(cursorp, &dbkey, &dbdata, DB_NEXT) == 0) {
263 +      /* update fname field with fresh data */
264 +      elt = (CurFile *)dbdata.data;
265 +      elt->fname = (char *)dbkey.data;
266 +      return elt;
267 +   } else {
268 +      return NULL;
269     }
270 +}
271  
272 -   if (jcr->file_list == NULL) {
273 -      goto bail_out;
274 +void AccurateBackendDB::finish()
275 +{
276 +   if (cursorp) {
277 +      cursorp->c_close(cursorp);
278 +      cursorp = NULL;
279     }
280 +}
281  
282 -   ff_pkt = init_find_files();
283 -   ff_pkt->type = FT_DELETED;
284 +#endif /* USE_DB */
285  
286 -   /* traverse records */
287 -   tcadbiterinit(jcr->file_list);
288 -   while((key = tcadbiternext2(jcr->file_list)) != NULL) {
289 -      elt = (CurFile *) tcadbget(jcr->file_list, 
290 -                                key, strlen(key)+1, &size);
291 -      if (elt)
292 -      {
293 -        if (!elt->seen) {      /* already seen */
294 -           ff_pkt->fname = key;
295 -           ff_pkt->statp.st_mtime = elt->mtime;
296 -           ff_pkt->statp.st_ctime = elt->ctime;
297 -           encode_and_send_attributes(jcr, ff_pkt, stream);
298 -        }
299 -        realfree(elt);
300 -      }
301 -      realfree(key);           /* tokyo cabinet have to use real free() */
302 -   }
303 +/****************************************************************/
304  
305 -   term_find_files(ff_pkt);
306 -bail_out:
307 -   /* TODO: clean htable when this function is not reached ? */
308 -   if (jcr->file_list) {
309 -      if(!tcadbclose(jcr->file_list)){
310 -        Jmsg(jcr, M_ERROR, 1, _("Can't close accurate hash disk\n"));
311 -      }
312 +/* 
313 + * This is the htable implementation for accurate mode
314 + */
315 +class AccurateBackendHT : public AccurateBackend
316 +{
317 +public:
318 +   ~AccurateBackendHT() { destroy(); }
319 +   bool init(JCR *jcr, int nb_elt);
320 +   void destroy();
321  
322 -      /* delete the object */
323 -      tcadbdel(jcr->file_list);
324 -      if (!bstrcmp(jcr->hash_name, "*")) {
325 -        unlink(jcr->hash_name);
326 -      }
327 +   bool insert(JCR *jcr, char *key, CurFile *item);
328 +   bool lookup(JCR *jcr, char *key, CurFile *item);
329  
330 -      free_pool_memory(jcr->hash_name);
331 -      jcr->hash_name = NULL;
332 -      jcr->file_list = NULL;
333 +   bool mark_as_seen(JCR *jcr, char *key, CurFile *item);
334 +
335 +   CurFile *first(CurFile *elt);
336 +   CurFile *next();
337 +   void finish();
338 +private:
339 +   htable *db;
340 +};
341 +
342 +typedef struct {
343 +   CurFile elt;
344 +   hlink link;                  /* need this for htable link */
345 +} HTCurFile;
346 +
347 +void AccurateBackendHT::destroy()
348 +{
349 +   if (db) {
350 +      db->destroy();
351 +      free(db);
352 +      db = NULL;
353     }
354 +}
355 +
356 +bool AccurateBackendHT::init(JCR *jcr, int nb_elt)
357 +{
358 +   Dmsg0(dbglvl, "init HT accurate backend\n");
359 +
360 +   HTCurFile *elt=NULL;
361 +   db = (htable *)malloc(sizeof(htable));
362 +   db->init(elt, &elt->link, nb_elt);
363     return true;
364  }
365  
366 -#else  /* HTABLE mode */
367 +bool AccurateBackendHT::insert(JCR *jcr, char *key, CurFile *item)
368 +{
369 +   /* alloc CurFile + hlink + fname */
370 +   HTCurFile *htf = (HTCurFile *)db->hash_malloc(sizeof(HTCurFile)+strlen(key)+1);
371 +   memcpy(&htf->elt, item, sizeof(CurFile));
372  
373 -static bool accurate_mark_file_as_seen(JCR *jcr, CurFile *elt)
374 +   /* store fname at the end of the struct */
375 +   htf->elt.fname = (char *) htf + sizeof(HTCurFile);
376 +
377 +   strcpy(htf->elt.fname, key);
378 +   db->insert(htf->elt.fname, htf); 
379 +   return true;
380 +}
381 +
382 +bool AccurateBackendHT::mark_as_seen(JCR *jcr, char *key, CurFile *item)
383  {
384 -   CurFile *temp = (CurFile *)jcr->file_list->lookup(elt->fname);
385 -   temp->seen = 1;             /* records are in memory */
386 +   HTCurFile *temp = (HTCurFile *)db->lookup(key);
387 +   if (temp) {
388 +      temp->elt.seen = 1;       /* update in memory */
389 +   }
390     return true;
391  }
392  
393 -static bool accurate_lookup(JCR *jcr, char *fname, CurFile *ret)
394 +bool AccurateBackendHT::lookup(JCR *jcr, char *key, CurFile *item)
395  {
396     bool found=false;
397 -   ret->seen = 0;
398  
399 -   CurFile *temp = (CurFile *)jcr->file_list->lookup(fname);
400 +   HTCurFile *temp = (HTCurFile *)db->lookup(key);
401     if (temp) {
402 -      memcpy(ret, temp, sizeof(CurFile));
403 +      memcpy(item, &temp->elt, sizeof(CurFile));
404        found=true;
405 -//    Dmsg1(dbglvl, "lookup <%s> ok\n", fname);
406     }
407 -
408     return found;
409  }
410  
411 +CurFile *AccurateBackendHT::first(CurFile *elt)
412 +{
413 +   HTCurFile *temp = (HTCurFile *)db->first();
414 +   return &temp->elt;
415 +}
416 +
417 +CurFile *AccurateBackendHT::next()
418 +{
419 +   HTCurFile *temp = (HTCurFile *)db->next();
420 +   return &temp->elt;
421 +}
422 +
423 +void AccurateBackendHT::finish()
424 +{
425 +}
426 +
427 +/****************************************************************/
428 +
429 +/* Create hash file 
430 + * For less than 1M files, use htable in memory
431 + */
432  static bool accurate_init(JCR *jcr, int nbfile)
433  {
434 -   CurFile *elt=NULL;
435 -   jcr->file_list = (htable *)malloc(sizeof(htable));
436 -   jcr->file_list->init(elt, &elt->link, nbfile);
437 +#ifdef USE_DB
438 +   if (nbfile > 1000000) {
439 +      jcr->file_list = New(AccurateBackendDB);
440 +   } else {
441 +      jcr->file_list = New(AccurateBackendHT);
442 +   }
443 +#else
444 +   jcr->file_list = New(AccurateBackendHT);
445 +#endif
446 +   jcr->file_list->init(jcr, nbfile);
447 +
448     return true;
449  }
450  
451 @@ -228,7 +346,8 @@
452   */
453  bool accurate_send_deleted_list(JCR *jcr)
454  {
455 -   CurFile *elt;
456 +   CurFile elt;
457 +   CurFile *item;
458     FF_PKT *ff_pkt;
459     int stream = STREAM_UNIX_ATTRIBUTES;
460  
461 @@ -242,31 +361,28 @@
462  
463     ff_pkt = init_find_files();
464     ff_pkt->type = FT_DELETED;
465 -
466 -   foreach_htable (elt, jcr->file_list) {
467 -      if (!elt->seen) { /* already seen */
468 -         Dmsg2(dbglvl, "deleted fname=%s seen=%i\n", elt->fname, elt->seen);
469 -         ff_pkt->fname = elt->fname;
470 -         ff_pkt->statp.st_mtime = elt->mtime;
471 -         ff_pkt->statp.st_ctime = elt->ctime;
472 +   
473 +   for (item = jcr->file_list->first(&elt); item ; item = jcr->file_list->next()) {
474 +      if (!item->seen) { /* already seen */
475 +         Dmsg2(dbglvl, "deleted fname=%s seen=%i\n", item->fname, item->seen);
476 +         ff_pkt->fname = item->fname;
477 +         ff_pkt->statp.st_mtime = item->mtime;
478 +         ff_pkt->statp.st_ctime = item->ctime;
479           encode_and_send_attributes(jcr, ff_pkt, stream);
480        }
481 -//      free(elt->fname);
482     }
483 +   jcr->file_list->finish();
484  
485     term_find_files(ff_pkt);
486  bail_out:
487     /* TODO: clean htable when this function is not reached ? */
488     if (jcr->file_list) {
489 -      jcr->file_list->destroy();
490 -      free(jcr->file_list);
491 +      delete jcr->file_list;
492        jcr->file_list = NULL;
493     }
494     return true;
495  }
496  
497 -#endif /* common code */
498 -
499  static bool accurate_add_file(JCR *jcr, char *fname, char *lstat)
500  {
501     bool ret = true;
502 @@ -278,25 +394,12 @@
503     elt.mtime = statp.st_mtime;
504     elt.seen = 0;
505  
506 -#ifdef USE_TCADB
507 -   if (!tcadbput(jcr->file_list,
508 -                fname, strlen(fname)+1,
509 -                &elt, sizeof(CurFile)))
510 -   {
511 -      Jmsg(jcr, M_ERROR, 1, _("Can't update accurate hash disk ERR=%s\n"));
512 +   if (!jcr->file_list->insert(jcr, fname, &elt)) {
513 +      Jmsg(jcr, M_ERROR, 1, _("Can't update accurate hash ERR=%s\n"));
514        ret = false;
515     }
516 -#else  /* HTABLE */
517 -   CurFile *item;
518 -   /* we store CurFile, fname and ctime/mtime in the same chunk */
519 -   item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+strlen(fname)+1);
520 -   memcpy(item, &elt, sizeof(CurFile));
521 -   item->fname  = (char *)item+sizeof(CurFile);
522 -   strcpy(item->fname, fname);
523 -   jcr->file_list->insert(item->fname, item); 
524 -#endif
525  
526 -// Dmsg2(dbglvl, "add fname=<%s> lstat=%s\n", fname, lstat);
527 +   Dmsg2(dbglvl, "add fname=<%s> lstat=%s\n", fname, lstat);
528     return ret;
529  }
530  
531 @@ -324,7 +427,7 @@
532        fname = ff_pkt->fname;
533     } 
534  
535 -   if (!accurate_lookup(jcr, fname, &elt)) {
536 +   if (!jcr->file_list->lookup(jcr, fname, &elt)) {
537        Dmsg1(dbglvl, "accurate %s (not found)\n", fname);
538        stat = true;
539        goto bail_out;
540 @@ -343,7 +446,7 @@
541       stat = true;
542     }
543  
544 -   accurate_mark_file_as_seen(jcr, &elt);
545 +   jcr->file_list->mark_as_seen(jcr, fname, &elt);
546     Dmsg2(dbglvl, "accurate %s = %i\n", fname, stat);
547  
548  bail_out:
549 @@ -379,7 +482,7 @@
550     while (dir->recv() >= 0) {
551        len = strlen(dir->msg) + 1;
552        if (len < dir->msglen) {
553 -        accurate_add_file(jcr, dir->msg, dir->msg + len);
554 +         accurate_add_file(jcr, dir->msg, dir->msg + len);
555        }
556     }
557  
558 @@ -398,17 +501,3 @@
559  
560     return true;
561  }
562 -
563 -#ifdef USE_TCADB
564 -
565 -/*
566 - * Tokyo Cabinet library doesn't use smartalloc by default
567 - * results need to be released with real free()
568 - */
569 -#undef free
570 -void realfree(void *p)
571 -{
572 -   free(p);
573 -}
574 -
575 -#endif
576 Index: src/filed/filed.h
577 ===================================================================
578 --- src/filed/filed.h   (révision 7351)
579 +++ src/filed/filed.h   (copie de travail)
580 @@ -35,11 +35,35 @@
581  
582  
583  #define FILE_DAEMON 1
584 -#ifdef USE_TCADB                     /* hash disk based */
585 -# include <tcadb.h>
586 -#else
587 -# include "lib/htable.h"
588 -#endif
589 +
590 +/* 
591 + * Used to store accurate information
592 + */
593 +typedef struct {
594 +   char *fname;
595 +   time_t ctime;
596 +   time_t mtime;
597 +   bool seen;
598 +} CurFile;
599 +
600 +/* 
601 + * Virtual class for accurate backend (libdb or htable)
602 + */
603 +class AccurateBackend: public SMARTALLOC
604 +{
605 +public:
606 +   AccurateBackend()  : SMARTALLOC()  {}
607 +   virtual ~AccurateBackend() {}
608 +   virtual bool init(JCR *jcr, int nb_elt) = 0;
609 +   virtual bool insert(JCR *jcr, char *key, CurFile *item) = 0;
610 +   virtual bool lookup(JCR *jcr, char *key, CurFile *item) = 0;
611 +   virtual bool mark_as_seen(JCR *jcr, char *key, CurFile *item) = 0;
612 +   virtual CurFile *first(CurFile *elt) = 0;
613 +   virtual CurFile *next()  = 0;
614 +   virtual void finish() = 0;
615 +   virtual void destroy() {}
616 +};
617 +
618  #include "filed_conf.h"
619  #include "fd_plugins.h"
620  #include "findlib/find.h"
621 Index: src/baconfig.h
622 ===================================================================
623 --- src/baconfig.h      (révision 7351)
624 +++ src/baconfig.h      (copie de travail)
625 @@ -113,6 +113,12 @@
626  
627  #endif /* HAVE_WIN32 */
628  
629 +/* Select db backend for accurate mode */
630 +#ifndef USE_TCADB
631 +# ifndef USE_DB
632 +#  define USE_HTABLE
633 +# endif
634 +#endif
635  
636  #ifdef ENABLE_NLS
637     #include <libintl.h>
638 Index: src/jcr.h
639 ===================================================================
640 --- src/jcr.h   (révision 7351)
641 +++ src/jcr.h   (copie de travail)
642 @@ -341,12 +341,7 @@
643     CRYPTO_CTX crypto;                 /* Crypto ctx */
644     DIRRES* director;                  /* Director resource */
645     bool VSS;                          /* VSS used by FD */
646 -#ifdef USE_TCADB
647 -   TCADB *file_list;                  /* Previous file list (accurate mode) */
648 -   POOLMEM *hash_name;
649 -#else
650 -   htable *file_list;                 /* Previous file list (accurate mode) */
651 -#endif
652 +   AccurateBackend *file_list;       /* Accurate backend store */
653  #endif /* FILE_DAEMON */
654  
655