nfs-ganesha 1.4

handle_mapping_db.h

Go to the documentation of this file.
00001 #ifndef _HANDLE_MAPPING_DB_H
00002 #define _HANDLE_MAPPING_DB_H
00003 
00004 #include "handle_mapping.h"
00005 #include "HashTable.h"
00006 
00007 #define DB_FILE_PREFIX "handlemap.sqlite"
00008 
00009 /* Database definition */
00010 #define MAP_TABLE      "HandleMap"
00011 #define OBJID_FIELD    "ObjectId"
00012 #define HASH_FIELD     "HandleHash"
00013 #define HANDLE_FIELD   "FSALHandle"
00014 
00015 #define MAX_DB  32
00016 
00022 int handlemap_db_count(const char *dir);
00023 
00029 int handlemap_db_init(const char *db_dir,
00030                       const char *tmp_dir,
00031                       unsigned int db_count,
00032                       unsigned int nb_dbop_prealloc, int synchronous_insert);
00033 
00040 int handlemap_db_reaload_all(hash_table_t * target_hash);
00041 
00046 int handlemap_db_insert(nfs23_map_handle_t * p_in_nfs23_digest,
00047                         fsal_handle_t * p_in_handle);
00048 
00054 int handlemap_db_delete(nfs23_map_handle_t * p_in_nfs23_digest);
00055 
00060 int handlemap_db_flush();
00061 
00062 #endif