Commit graph

103 commits

Author SHA1 Message Date
nvt-se
aaa9d62304 fixed cfs_seek signature. 2009-02-27 14:52:52 +00:00
nvt-se
6615e39e27 switched unsigned int to cfs_offset_t 2009-02-27 14:50:35 +00:00
nvt-se
90e8016906 file end check must be against fdp->offset. 2009-02-27 14:35:12 +00:00
nvt-se
3191a2568c Major API change:
1. Introduced a cfs_offset_t type that designates file offsets. unsigned int
was insufficient on several platforms with non-volatile storage that exceed
the capacity of unsigned int.

2. Switched cfs_seek signature to POSIX style with a "whence" parameter.
2009-02-27 14:25:37 +00:00
nvt-se
5e038640e2 fixed error in last commit: second character must terminate 2009-02-27 13:21:59 +00:00
nvt-se
a258be684f permit the current directory name "." to be used in cfs_opendir. 2009-02-27 13:19:04 +00:00
nvt-se
2295df7246 The text suggested that only append operations were supported. 2009-02-27 10:54:08 +00:00
nvt-se
2e12c2408e bug fix: removed possible null pointer dereference. 2009-02-25 23:59:26 +00:00
nvt-se
bc7c90bb9f doubled the speed of uncached file openings. 2009-02-22 15:19:31 +00:00
nvt-se
957ae56b13 broke out the essence of the search algorithm to a separate function. 2009-02-19 21:35:38 +00:00
nvt-se
07c50cc200 corrected file cache status checks in previous commit. 2009-02-17 18:50:29 +00:00
nvt-se
d029dd8240 cleaned up mostly the GC code.
made EOF hints optional.

default build is now ~500 bytes smaller.
2009-02-17 16:56:32 +00:00
nvt-se
883d10e136 GC fix: isolated pages must always be allocated.
page allocation: increased utilization because the algorithm failed to
count all space before.

style: renamed and simplified some code and names.
2009-02-14 19:09:17 +00:00
nvt-se
b8f3dca765 fixed merge_log bug and space allocation error with isolated pages. 2009-02-12 11:24:22 +00:00
nvt-se
98f7f9a06a sizeof on coffee_fd_set is no longer suitable since it has become a
pointer.
2009-02-09 12:02:10 +00:00
fros4943
4f7f3c97b5 * added coffee_files to the protected memory needed during cfs-based checkpointing operations
* renamed cfs_coffee_get_fd_set() to cfs_coffee_get_protected_memory() to highlight that not only fd_set is protected
2009-02-09 10:08:26 +00:00
nvt-se
d0a546b049 A long refactoring session yielded the following.
Technical changes:

* Factored out file specific information from the file descriptor
  structure into a new file structure.

  - Useful file metadata can be stored after the file is closed.
  - File descriptors become much smaller.
  - Significantly reduces the need to scan for the file end.

* Use correct types in all function signatures.
* Removed the directory cache.

Results:

* Enormous speed increase when opening cached files (10x-20x.)
* Multiple fd:s pointing to the same file have the correct semantics.
* About 100 bytes smaller ROM size.
* Slightly smaller static RAM size.
2009-02-08 17:08:13 +00:00
nvt-se
fda75c4c08 Use the right type for pages in the directory cache. This makes the
cache much smaller on most platforms.
2009-02-03 16:21:53 +00:00
nvt-se
4b56200586 documented the new function that helps sensornet checkpointing to protect
file descriptors while rolling back state.
2009-01-29 18:24:58 +00:00
fros4943
8f462b9a52 zeroed debug flag 2009-01-23 17:28:09 +00:00
fros4943
7e5047012b added function for getting coffee's fd_set address and size 2009-01-23 16:27:49 +00:00
nvt-se
9d7e9fe297 reduced code size by removing some unnecessary statements. 2008-12-18 15:49:43 +00:00
nvt-se
f041a2eada fixed compilation error when debug flag was set. 2008-12-12 10:23:49 +00:00
nvt-se
532ebc1e9a reduced the code size by 200 bytes.
fixed an EOF hint bug that occured when files where extended.
2008-12-09 16:01:18 +00:00
nvt-se
8c608efea4 added file removal capability to xmem fs 2008-11-30 22:42:40 +00:00
nvt-se
15e8675ab9 Added file removal function to the CFS API. Only cfs-coffee and cfs-posix
implements this, whereas the others just return -1.
2008-11-24 10:56:55 +00:00
nvt-se
a59cbaf19f removed redundant code. 2008-11-19 14:39:08 +00:00
nvt-se
5fe2c34038 - important bug fix regarding writing after a merge log operation: parameters
must be restored.

- fixed watchdog problem in reserve
2008-11-19 13:42:07 +00:00
nvt-se
c4a5010c46 break out eof update functionality since its now needed at more than one
place.
2008-11-18 23:10:30 +00:00
nvt-se
3c0d67c14f simplified complex functions through abstractions.
switched base offset to coffee_offset_t type.
2008-11-17 14:37:23 +00:00
nvt-se
25a73a43dc loop parameter must be signed in case batch_size is 0. 2008-11-17 10:34:57 +00:00
nvt-se
5fc9534188 reuse merge_log to also do file extensions. 2008-11-17 09:09:17 +00:00
nvt-se
2ec836f1f9 function argument should be a pointer 2008-11-13 14:46:32 +00:00
nvt-se
4e2d39546b removed debug output. 2008-11-13 00:58:51 +00:00
nvt-se
a06ad707ee corrected EOF hint calculation. 2008-11-13 00:58:13 +00:00
nvt-se
28ed5e2a4a - Added passive directory cache filling.
- Improved variable naming.
- Cast unknown integer type parameters to format type for printf calls.
2008-11-10 23:07:53 +00:00
nvt-se
a1ea7cbe3e generalized log buffer adjustments into functions. simplified next_log_record
usage.
2008-11-04 23:30:47 +00:00
nvt-se
6ca91f1271 revoked accidental renaming om dir cache entries. 2008-11-04 23:12:44 +00:00
nvt-se
e6a7089942 refactored the code and reduced the ROM size a few dozen of bytes 2008-11-04 23:09:55 +00:00
nvt-se
ae8c93d0aa cut 500 bytes of ROM size. 2008-11-04 17:48:36 +00:00
nvt-se
1309cb474d removed redundant code 2008-11-04 17:23:59 +00:00
nvt-se
becfecfe1b reduced rom size by ~40 bytes 2008-11-04 16:58:52 +00:00
nvt-se
a6a17bc52c optimized the merge log operation and fixed a fd update bug. 2008-11-04 15:49:54 +00:00
nvt-se
71d01a44a1 adjust read chunk size according to log entry size 2008-11-03 20:21:43 +00:00
nvt-se
fff8b46110 fixed a buffer bug with the micro logs 2008-11-03 16:58:18 +00:00
nvt-se
a6afeb2de6 fixed bug with dislocated end of file search 2008-11-03 15:13:13 +00:00
nvt-se
afeedb1f2b fixed compiler warnings that were introduced with the new reserve function. 2008-10-29 15:36:21 +00:00
nvt-se
e15fbdbd40 allow duplicate reservations when flushing the log. 2008-10-28 14:47:50 +00:00
nvt-se
f05ccac0a7 documented the extra Coffee functions. 2008-10-21 13:39:56 +00:00
nvt-se
b591bb1b72 read as much as possible, even when reading log records. 2008-10-21 13:26:24 +00:00