- 08 Jul, 2010 7 commits
-
-
Per Cederqvist authored
-
Per Cederqvist authored
-
Per Cederqvist authored
in the link. * src/server/text-store.h: New file, currently empty. * src/server/text-store.c: New file. Include text-store.h, but do not yet do anything. * src/server/Makefile.am (DISKOBJS): Added text-store.c and text-store.h. (DBCK): Added text-store.c.
-
Per Cederqvist authored
* src/include/kom-types.h (Text_stat): Remove the reclamation field. It was a mistake to add it 2006-11-06. * src/server/dbck-cache.c (cached_flush_text): Don't touch reclamation. * src/server/memory.c (copy_text_stat): Ditto. (init_text_stat): Ditto. * src/server/ram-output.c (foutput_text_stat_3): Ditto. * src/server/ram-parse.c (fparse_text_stat_3): Ditto. (fparse_text_stat_2): Ditto. (fparse_text_stat_0): Ditto. * src/server/simple-cache.c (cached_create_text): Ditto.
-
Per Cederqvist authored
Added support for renaming a datafile once it has been completely written, and to write it using a temporary extension. * src/server/ram-io.h (struct dbfile): Added fields fn, tmp_extension and tmp_fn. Added documentation. (dbfile_open_write): New argument: tmp_extension. (dbfile_rename): New function. (dbfile_abort): New function. * src/server/ram-io.c (dbfile_new): Initialize fn, tmp_extension and tmp_fn. (current_fn): New static function. Return tmp_fn if non-NULL, otherwise fn. (dbfile_delete): Free the new fields fn, tmp_extension and tmp_fn. (dbfile_open_write): New argument: tmp_extension. Store a copy of the supplied filename. If tmp_extension is non-NULL, store a copy of it, and compute the actual file name to open as the filname followed by the tmp_extension. (fsync_dirname): New static function. (dbfile_rename): New function. Rename the file from tmp_fn to the wanted final filename, and sync the directory. (dbfile_abort): New function. * src/server/dbck-cache.c (cache_sync_all): Pass a NULL pointer as tmp_extension of dbfile_open_write(), to get the old behavior. * src/server/simple-cache.c (pre_sync): Ditto.
-
Per Cederqvist authored
* src/server/ram-smalloc.c, src/include/server/smalloc.h: (sstrdup): New function.
-
Per Cederqvist authored
* src/server/ram-io.c (dbfile_open_read): New argument: wanted_magic. Log a message and return NULL if the file contains the wrong magic cookie. All callers updated to supply "CLEAN" as the magic cookie.
-