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