cl5_api.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. /** BEGIN COPYRIGHT BLOCK
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. * END COPYRIGHT BLOCK **/
  38. /* cl5_api.h - interface to 5.0 changelog */
  39. #ifndef CL5_API_H
  40. #define CL5_API_H
  41. #include "repl5.h"
  42. #include "repl5_prot_private.h"
  43. #define CL5_TYPE "Changelog5" /* changelog type */
  44. #define VERSION_SIZE 127 /* size of the buffer to hold changelog version */
  45. #define CL5_DEFAULT_CONFIG -1 /* value that indicates to changelog to use default */
  46. #define CL5_STR_IGNORE "-1" /* tels function to ignore this parameter */
  47. #define CL5_NUM_IGNORE -1 /* tels function to ignore this parameter */
  48. #define CL5_STR_UNLIMITED "0" /* represent unlimited value (trimming ) */
  49. #define CL5_NUM_UNLIMITED 0 /* represent unlimited value (trimming ) */
  50. #define CL5_OS_ERR_IS_DISKFULL(err) ((err)==ENOSPC || (err)==EFBIG)
  51. /***** Data Structures *****/
  52. /* changelog configuration structure */
  53. typedef struct cl5dbconfig
  54. {
  55. size_t cacheSize; /* cache size in bytes */
  56. PRBool durableTrans; /* flag that tells not to sync log when trans commits */
  57. PRInt32 checkpointInterval; /* checkpoint interval in seconds */
  58. PRBool circularLogging; /* flag to archive and trancate log */
  59. size_t pageSize; /* page size in bytes */
  60. size_t logfileSize; /* maximum log size in bytes */
  61. size_t maxTxnSize; /* maximum txn table size in count*/
  62. PRInt32 fileMode; /* file mode */
  63. PRBool verbose; /* Get libdb to exhale debugging info */
  64. PRBool debug; /* Will libdb emit debugging info into our log ? */
  65. PRInt32 tricklePercentage; /* guaranteed percentage of clean cache pages; 0 - 100 */
  66. PRInt32 spinCount; /* DB Mutex spin count */
  67. PRUint32 nb_lock_config; /* Number of locks in the DB lock table. New in 5.1 */
  68. /* The next 2 parameters are needed for configuring the changelog cache. New in 5.1 */
  69. PRUint32 maxChCacheEntries;
  70. PRUint32 maxChCacheSize;
  71. PRUint32 maxConcurrentWrites; /* 6.2 max number of concurrent cl writes */
  72. } CL5DBConfig;
  73. /* changelog entry format */
  74. typedef struct cl5entry
  75. {
  76. slapi_operation_parameters *op; /* operation applied to the server */
  77. time_t time; /* time added to the cl; used for trimming */
  78. } CL5Entry;
  79. /* default values for the changelog configuration structure above */
  80. /*
  81. * For historical reasons, dbcachesize refers to number of bytes at the DB level,
  82. * whereas cachesize refers to number of entries at the changelog cache level (cachememsize is the
  83. * one refering to number of bytes at the changelog cache level)
  84. */
  85. #define CL5_DEFAULT_CONFIG_DB_DBCACHESIZE 10485760 /* 10M bytes */
  86. #define CL5_DEFAULT_CONFIG_DB_DURABLE_TRANSACTIONS 1
  87. #define CL5_DEFAULT_CONFIG_DB_CHECKPOINT_INTERVAL 60
  88. #define CL5_DEFAULT_CONFIG_DB_CIRCULAR_LOGGING 1
  89. #define CL5_DEFAULT_CONFIG_DB_PAGE_SIZE 8*1024
  90. #define CL5_DEFAULT_CONFIG_DB_LOGFILE_SIZE 0
  91. #define CL5_DEFAULT_CONFIG_DB_VERBOSE 0
  92. #define CL5_DEFAULT_CONFIG_DB_DEBUG 0
  93. #define CL5_DEFAULT_CONFIG_DB_TRICKLE_PERCENTAGE 40
  94. #define CL5_DEFAULT_CONFIG_DB_SPINCOUNT 0
  95. #define CL5_DEFAULT_CONFIG_DB_TXN_MAX 200
  96. #define CL5_DEFAULT_CONFIG_CACHESIZE 3000 /* number of entries */
  97. #define CL5_DEFAULT_CONFIG_CACHEMEMSIZE 1048576 /* 1 M bytes */
  98. #define CL5_DEFAULT_CONFIG_NB_LOCK 1000 /* Number of locks in the lock table of the DB */
  99. /*
  100. * Small number of concurrent writes degradate the throughput.
  101. * Large one increases deadlock.
  102. */
  103. #ifdef SOLARIS
  104. #define CL5_DEFAULT_CONFIG_MAX_CONCURRENT_WRITES 10
  105. #else
  106. #define CL5_DEFAULT_CONFIG_MAX_CONCURRENT_WRITES 2
  107. #endif
  108. #define CL5_MIN_DB_DBCACHESIZE 524288 /* min 500K bytes */
  109. #define CL5_MIN_CACHESIZE 500 /* min number of entries */
  110. #define CL5_MIN_CACHEMEMSIZE 262144 /* min 250K bytes */
  111. #define CL5_MIN_NB_LOCK 1000 /* The minimal number of locks in the DB (Same as default) */
  112. /* data structure that allows iteration through changelog */
  113. typedef struct cl5replayiterator CL5ReplayIterator;
  114. /* changelog state */
  115. typedef enum
  116. {
  117. CL5_STATE_NONE, /* changelog has not been initialized */
  118. CL5_STATE_CLOSING, /* changelog is about to close; all threads must exit */
  119. CL5_STATE_CLOSED, /* changelog has been initialized, but not opened, or open and then closed */
  120. CL5_STATE_OPEN /* changelog is opened */
  121. } CL5State;
  122. /* error codes */
  123. enum
  124. {
  125. CL5_SUCCESS, /* successful operation */
  126. CL5_BAD_DATA, /* invalid parameter passed to the function */
  127. CL5_BAD_FORMAT, /* db data has unexpected format */
  128. CL5_BAD_STATE, /* changelog is in an incorrect state for attempted operation */
  129. CL5_BAD_DBVERSION, /* changelog has invalid dbversion */
  130. CL5_DB_ERROR, /* database error */
  131. CL5_NOTFOUND, /* requested entry or value was not found */
  132. CL5_MEMORY_ERROR, /* memory allocation failed */
  133. CL5_SYSTEM_ERROR, /* NSPR error occured, use PR_Error for furhter info */
  134. CL5_CSN_ERROR, /* CSN API failed */
  135. CL5_RUV_ERROR, /* RUV API failed */
  136. CL5_OBJSET_ERROR, /* namedobjset api failed */
  137. CL5_PURGED_DATA, /* requested data has been purged */
  138. CL5_MISSING_DATA, /* data should be in the changelog, but is missing */
  139. CL5_UNKNOWN_ERROR /* unclassified error */
  140. };
  141. /***** Module APIs *****/
  142. /* Name: cl5Init
  143. Description: initializes changelog module; must be called by a single thread
  144. before any function of the module.
  145. Parameters: none
  146. Return: CL5_SUCCESS if function is successful;
  147. CL5_BAD_DATA if invalid directory is passed;
  148. CL5_SYSTEM error if NSPR call fails.
  149. */
  150. int cl5Init ();
  151. /* Name: cl5Cleanup
  152. Description: performs cleanup of the changelog module. Must be called by a single
  153. thread. It will closed db if it is still open.
  154. Parameters: none
  155. Return: none
  156. */
  157. void cl5Cleanup ();
  158. /* Name: cl5Open
  159. Description: opens changelog ; must be called after changelog is
  160. initialized using cl5Init. It is thread safe and the second
  161. call is ignored.
  162. Parameters: dir - changelog dir
  163. config - db configuration parameters; currently not used
  164. openMode - open mode
  165. Return: CL5_SUCCESS if successfull;
  166. CL5_BAD_DATA if invalid directory is passed;
  167. CL5_BAD_DBVERSION if dbversion file is missing or has unexpected data
  168. CL5_SYSTEM_ERROR if NSPR error occured (during db directory creation);
  169. CL5_MEMORY_ERROR if memory allocation fails;
  170. CL5_DB_ERROR if db initialization or open fails.
  171. */
  172. int cl5Open (const char *dir, const CL5DBConfig *config);
  173. /* Name: cl5Close
  174. Description: closes changelog and cleanups changelog module; waits until
  175. all threads are done using changelog
  176. Parameters: none
  177. Return: CL5_SUCCESS if successful;
  178. CL5_BAD_STATE if db is not in the open state;
  179. CL5_SYSTEM_ERROR if NSPR call fails
  180. */
  181. int cl5Close ();
  182. /* Name: cl5Delete
  183. Description: removes changelog
  184. Parameters: dir - changelog directory
  185. Return: CL5_SUCCESS if successful;
  186. CL5_BAD_STATE if the changelog is not in closed state;
  187. CL5_BAD_DATA if invalid directory supplied
  188. CL5_SYSTEM_ERROR if NSPR call fails
  189. */
  190. int cl5Delete (const char *dir);
  191. /* Name: cl5OpenDB
  192. Description: opens changelog file for specified file
  193. Parameters: replica - replica whose file we wish to open
  194. Return: CL5_SUCCESS if successful;
  195. CL5_BAD_STATE if the changelog is not initialized;
  196. CL5_BAD_DATA - if NULL id is supplied
  197. */
  198. int cl5OpenDB (Object *replica);
  199. /* Name: cl5CloseDB
  200. Description: closes changelog file for the specified replica
  201. Parameters: replica - replica whose file we wish to close
  202. Return: CL5_SUCCESS if successful;
  203. CL5_BAD_STATE if the changelog is not initialized;
  204. CL5_BAD_DATA - if NULL id is supplied
  205. CL5_NOTFOUND - nothing is known about specified database
  206. */
  207. int cl5CloseDB (Object *replica);
  208. /* Name: cl5DeleteDB
  209. Description: asynchronously removes changelog file for the specified replica.
  210. The file is physically removed when it is no longer in use.
  211. This function is called when a backend is removed or reloaded.
  212. Parameters: replica - replica whose file we wish to delete
  213. Return: CL5_SUCCESS if successful;
  214. CL5_BAD_STATE if the changelog is not initialized;
  215. CL5_BAD_DATA - if NULL id is supplied
  216. CL5_NOTFOUND - nothing is known about specified database
  217. */
  218. int cl5DeleteDB (Object *replica);
  219. /* Name: cl5DeleteDBSync
  220. Description: The same as cl5DeleteDB except the function does not return
  221. until the file is removed.
  222. */
  223. int cl5DeleteDBSync (Object *replica);
  224. /* Name: cl5GetUpperBoundRUV
  225. Description: retrieves vector that represent the upper bound of changes
  226. stored in the changelog for the replica.
  227. Parameters: r - replica for which the vector is requested
  228. ruv - contains a copy of the upper bound ruv if function is successful;
  229. unchanged otherwise. It is responsobility pf the caller to free
  230. the ruv when it is no longer is in use
  231. Return: CL5_SUCCESS if function is successfull
  232. CL5_BAD_STATE if the changelog is not initialized;
  233. CL5_BAD_DATA - if NULL id is supplied
  234. CL5_NOTFOUND, if changelog file for replica is not found
  235. */
  236. int cl5GetUpperBoundRUV (Replica *r, RUV **ruv);
  237. /* Name: cl5Backup
  238. Description: makes a backup of the changelog including *.db2,
  239. log files, and dbversion. Can be called with the changelog in either open or
  240. closed state.
  241. Parameters: bkDir - directory to which the data is backed up;
  242. created if it does not exist
  243. replicas - optional list of replicas whose changes should be backed up;
  244. if the list is NULL, entire changelog is backed up.
  245. Return: CL5_SUCCESS if function is successful;
  246. CL5_BAD_DATA if invalid directory is passed;
  247. CL5_BAD_STATE if changelog has not been initialized;
  248. CL5_DB_ERROR if db call fails;
  249. CL5_SYSTEM_ERROR if NSPR call or file copy failes.
  250. */
  251. int cl5Backup (const char *bkDir, Object **replicas);
  252. /* Name: cl5Restore
  253. Description: restores changelog from the backed up copy. Changelog must be ibnitalized and closed.
  254. Parameters: clDir - changelog dir
  255. bkDir - directory that contains the backup
  256. replicas - optional list of replicas whose changes should be recovered;
  257. if the list is NULL, entire changelog is recovered.
  258. Return: CL5_SUCCESS if function is successfull;
  259. CL5_BAD_DATA if invalid parameter is passed;
  260. CL5_BAD_STATE if changelog is open or not initialized;
  261. CL5_DB_ERROR if db call fails;
  262. CL5_SYSTEM_ERROR if NSPR call of file copy fails
  263. */
  264. int cl5Restore (const char *clDir, const char *bkDir, Object **replicas);
  265. /* Name: cl5ExportLDIF
  266. Description: dumps changelog to an LDIF file; changelog can be open or closed.
  267. Parameters: clDir - changelog dir
  268. ldifFile - full path to ldif file to write
  269. replicas - optional list of replicas whose changes should be exported;
  270. if the list is NULL, entire changelog is exported.
  271. Return: CL5_SUCCESS if function is successfull;
  272. CL5_BAD_DATA if invalid parameter is passed;
  273. CL5_BAD_STATE if changelog is not initialized;
  274. CL5_DB_ERROR if db api fails;
  275. CL5_SYSTEM_ERROR if NSPR call fails;
  276. CL5_MEMORY_ERROR if memory allocation fials.
  277. */
  278. int cl5ExportLDIF (const char *ldifFile, Object **replicas);
  279. /* Name: cl5ImportLDIF
  280. Description: imports ldif file into changelog; changelog must be in the closed state
  281. Parameters: clDir - changelog dir
  282. ldifFile - absolute path to the ldif file to import
  283. replicas - optional list of replicas whose data should be imported;
  284. if the list is NULL, all data in the file is imported.
  285. Return: CL5_SUCCESS if function is successfull;
  286. CL5_BAD_DATA if invalid parameter is passed;
  287. CL5_BAD_STATE if changelog is open or not inititalized;
  288. CL5_DB_ERROR if db api fails;
  289. CL5_SYSTEM_ERROR if NSPR call fails;
  290. CL5_MEMORY_ERROR if memory allocation fials.
  291. */
  292. int cl5ImportLDIF (const char *clDir, const char *ldifFile, Object **replicas);
  293. /* Name: cl5GetState
  294. Description: returns database state
  295. Parameters: none
  296. Return: changelog state
  297. */
  298. int cl5GetState ();
  299. /* Name: cl5ConfigTrimming
  300. Description: sets changelog trimming parameters
  301. Parameters: maxEntries - maximum number of entries in the log;
  302. maxAge - maximum entry age;
  303. Return: CL5_SUCCESS if successful;
  304. CL5_BAD_STATE if changelog has not been open
  305. */
  306. int cl5ConfigTrimming (int maxEntries, const char *maxAge);
  307. /* Name: cl5GetOperation
  308. Description: retireves operation specified by its csn and databaseid
  309. Parameters: op - must contain csn and databaseid; the rest of data is
  310. filled if function is successfull
  311. Return: CL5_SUCCESS if function is successfull;
  312. CL5_BAD_DATA if invalid op is passed;
  313. CL5_BAD_STATE if db has not been initialized;
  314. CL5_NOTFOUND if entry was not found;
  315. CL5_DB_ERROR if any other db error occured;
  316. CL5_BADFORMAT if db data format does not match entry format.
  317. */
  318. int cl5GetOperation (Object *replica, slapi_operation_parameters *op);
  319. /* Name: cl5GetFirstOperation
  320. Description: retrieves first operation for a particular database
  321. replica - replica for which the operation should be retrieved.
  322. Parameters: op - buffer to store the operation;
  323. iterator - to be passed to the call to cl5GetNextOperation
  324. Return: CL5_SUCCESS, if successful
  325. CL5_BADDATA, if operation is NULL
  326. CL5_BAD_STATE, if changelog is not open
  327. CL5_DB_ERROR, if db call fails
  328. */
  329. int cl5GetFirstOperation (Object *replica, slapi_operation_parameters *op, void **iterator);
  330. /* Name: cl5GetNextOperation
  331. Description: retrieves the next op from the changelog as defined by the iterator
  332. Parameters: replica - replica for which the operation should be retrieved.
  333. op - returned operation, if function is successful
  334. iterator - in: identifies op to retrieve; out: identifies next op
  335. Return: CL5_SUCCESS, if successful
  336. CL5_BADDATA, if invalid parameter is supplied
  337. CL5_BAD_STATE, if changelog is not open
  338. CL5_NOTFOUND, empty changelog
  339. CL5_DB_ERROR, if db call fails
  340. */
  341. int cl5GetNextOperation (slapi_operation_parameters *op, void *iterator);
  342. /* Name: cl5DestroyIterator
  343. Description: destroys iterator once iteration through changelog is done
  344. Parameters: iterator - iterator to destroy
  345. Return: CL5_SUCCESS, if successful
  346. CL5_BADDATA, if invalid parameters is supplied
  347. CL5_BAD_STATE, if changelog is not open
  348. CL5_DB_ERROR, if db call fails
  349. */
  350. void cl5DestroyIterator (void *iterator);
  351. /* Name: cl5WriteOperation
  352. Description: writes operation to changelog
  353. Parameters: repl_name - name of the replica to which operation applies
  354. repl_gen - replica generation for the operation
  355. !!!Note that we pass name and generation rather than
  356. replica object since generation can change while operation
  357. is in progress (if the data is reloaded). !!!
  358. op - operation to write
  359. local - this is a non-replicated operation
  360. Return: CL5_SUCCESS if function is successfull;
  361. CL5_BAD_DATA if invalid op is passed;
  362. CL5_BAD_STATE if db has not been initialized;
  363. CL5_MEMORY_ERROR if memory allocation failed;
  364. CL5_DB_ERROR if any other db error occured;
  365. */
  366. int cl5WriteOperation(const char *repl_name, const char *repl_gen,
  367. const slapi_operation_parameters *op, PRBool local);
  368. /* Name: cl5CreateReplayIterator
  369. Description: creates an iterator that allows to retireve changes that should
  370. to be sent to the consumer identified by ruv The iteration is peformed by
  371. repeated calls to cl5GetNextOperationToReplay.
  372. Parameters: replica - replica whose data we wish to iterate;
  373. ruv - consumer ruv;
  374. iterator - iterator to be passed to cl5GetNextOperationToReplay call
  375. Return: CL5_SUCCESS, if function is successfull;
  376. CL5_MISSING_DATA, if data that should be in the changelog is missing
  377. CL5_PURGED_DATA, if some data that consumer needs has been purged.
  378. Note that the iterator can be non null if the supplier contains
  379. some data that needs to be sent to the consumer
  380. CL5_NOTFOUND if the consumer is up to data with respect to the supplier
  381. CL5_BAD_DATA if invalid parameter is passed;
  382. CL5_BAD_STATE if db has not been open;
  383. CL5_DB_ERROR if any other db error occured;
  384. CL5_MEMORY_ERROR if memory allocation fails.
  385. */
  386. int cl5CreateReplayIterator (Private_Repl_Protocol *prp, const RUV *ruv,
  387. CL5ReplayIterator **iterator);
  388. int cl5CreateReplayIteratorEx (Private_Repl_Protocol *prp, const RUV *consumerRuv,
  389. CL5ReplayIterator **iterator, ReplicaId consumerRID );
  390. /* Name: cl5GetNextOperationToReplay
  391. Description: retrieves next operation to be sent to the consumer and
  392. that was created on a particular master. Consumer and master info
  393. is encoded in the iterator parameter that must be created by calling
  394. to cl5CreateIterator.
  395. Parameters: iterator - iterator that identifies next entry to retrieve;
  396. op - operation retireved if function is successful
  397. Return: CL5_SUCCESS if function is successfull;
  398. CL5_BAD_DATA if invalid parameter is passed;
  399. CL5_NOTFOUND if end of iteration list is reached
  400. CL5_DB_ERROR if any other db error occured;
  401. CL5_BADFORMAT if data in db is of unrecognized format;
  402. CL5_MEMORY_ERROR if memory allocation fails.
  403. */
  404. int cl5GetNextOperationToReplay (CL5ReplayIterator *iterator,
  405. CL5Entry *entry);
  406. /* Name: cl5DestroyReplayIterator
  407. Description: destorys iterator
  408. Parameters: iterator - iterator to destory
  409. Return: none
  410. */
  411. void cl5DestroyReplayIterator (CL5ReplayIterator **iterator);
  412. /* Name: cl5DeleteOnClose
  413. Description: marks changelog for deletion when it is closed
  414. Parameters: flag; if flag = 1 then delete else don't
  415. Return: none
  416. */
  417. void cl5DeleteOnClose (PRBool rm);
  418. /* Name: cl5GetDir
  419. Description: returns changelog directory; must be freed by the caller;
  420. Parameters: none
  421. Return: copy of the directory; caller needs to free the string
  422. */
  423. char *cl5GetDir ();
  424. /* Name: cl5Exist
  425. Description: checks if a changelog exists in the specified directory
  426. Parameters: clDir - directory to check;
  427. Return: 1 - if changelog exists; 0 - otherwise
  428. */
  429. PRBool cl5Exist (const char *clDir);
  430. /* Name: cl5GetOperationCount
  431. Description: returns number of entries in the changelog. The changelog must be
  432. open for the value to be meaningful.
  433. Parameters: replica - optional parameter that specifies the replica whose operations
  434. we wish to count; if NULL all changelog entries are counted
  435. Return: number of entries in the changelog
  436. */
  437. int cl5GetOperationCount (Object *replica);
  438. /* Name: cl5_operation_parameters_done
  439. Description: frees all parameters that are not freed by operation_parameters_done
  440. function in the server.
  441. */
  442. void cl5_operation_parameters_done (struct slapi_operation_parameters *sop);
  443. /* Name: cl5CreateDirIfNeeded
  444. Description: Create the directory if it doesn't exist yet
  445. Parameters: dir - Contains the name of the directory to create. Must not be NULL
  446. Return: CL5_SUCCESS if succeeded or existed,
  447. CL5_SYSTEM_ERROR if failed.
  448. */
  449. int cl5CreateDirIfNeeded (const char *dir);
  450. int cl5DBData2Entry (const char *data, PRUint32 len, CL5Entry *entry);
  451. PRBool cl5HelperEntry (const char *csnstr, CSN *csn);
  452. CSN** cl5BuildCSNList (const RUV *consRuv, const RUV *supRuv);
  453. void cl5DestroyCSNList (CSN*** csns);
  454. int cl5_is_diskfull();
  455. int cl5_diskspace_is_available();
  456. #endif