Commit graph

157 commits

Author SHA1 Message Date
Nicolas Tsiftes
aef0e9eae6 Ensure that the file end is updated in the original file extent if it has been overwritten through a micro log operation. 2014-03-03 21:27:26 +01:00
Adam Dunkels
bb2dcaa057 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
Oliver Schmidt
1fdeb4c788 Changed handling of predefined macros in cc65 allows for simplification. 2013-11-20 20:55:56 +01:00
Oliver Schmidt
9970a3631a The new POSIX directory access in the CBM C library comes with a d_blocks field too. 2013-02-17 01:03:51 +01:00
nvt
757a54f63c Added some comments about Antelope and Coffee. 2012-11-19 13:21:59 +01:00
Adam Dunkels
944537fccf Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
nvt
5330dd1565 Avoid reading bytes from the original file when their is a log entry for that part of the file. 2011-07-30 10:05:23 +02:00
Nicolas Tsiftes
ce909a97e6 Removed unread stack variable 2011-06-10 17:41:46 +02:00
Joakim Eriksson
77ec0bfa0f fixed the z1 platform and generic code used by z1 to work with IAR compiler 2011-05-25 17:21:51 +02:00
Fredrik Osterlind
499c13a357 removed execute flag of source files (avoids diff problems with egit) 2011-03-01 18:16:42 +01:00
nvt
20bf23cf06 Replaced ifdef with if, as salvopitru suggested 2011-02-14 15:53:08 +01:00
nvt
4125c38808 missing word 2011-02-13 21:34:29 +01:00
Nicolas Tsiftes
774aa3984a Use a more understandable name 2011-02-09 15:17:25 +01:00
Nicolas Tsiftes
c77cb63df1 ifdef -> if 2011-02-09 15:13:50 +01:00
Nicolas Tsiftes
39ea9405bb Added a function for setting the I/O semantics on a Coffee file descriptor. Changed the configuration parameters slightly and updated the platform definitions to reflect this change. 2011-02-09 15:03:57 +01:00
nvt-se
faab7229c9 Must check the storage boundary in find_contiguous_pages. 2011-01-25 18:39:09 +00:00
nvt-se
28421f1fe2 Removed watchdog calls from Coffee 2011-01-18 14:06:33 +00:00
nvt-se
404230a047 Added a macro for portable watchdog calls. 2010-12-15 14:01:07 +00:00
nvt-se
1168703506 Minor clarifications in the code and comments. Integrated atches from Frederic Sureau: 1. copy_buf is now an ordinary char pointer. 2. Read directly from a file that is not modified. This reduces the code size when COFFEE_MICRO_LOGS is set to 0. 3. Update the file end value each time it is changed in case a log merge operation occurs later. 4. Avoid possible alignment problem in reading from the dummy_space area when calling cfs_readdir. 2010-11-11 13:08:23 +00:00
nvt-se
909569f834 Must check if load_file succeeded 2010-10-01 20:14:14 +00:00
nvt-se
8c3ed291bb Preserve the file offset if a seek operation fails. 2010-05-13 18:24:55 +00:00
nvt-se
e4187b2fc8 Made pointers constant and thereby reduced the code size slightly. 2010-05-05 12:35:39 +00:00
nvt-se
f9ca4a546d Introduced append-only mode for systems with little available code space left, but which require basic FS support. Removes about 1.5kB ROM when the mode is enabled, i.e., COFFEE_CONF_APPEND_ONLY=1 2010-04-12 13:20:55 +00:00
fros4943
b952f97799 stopping watchdog during find_file 2010-03-29 11:31:35 +00:00
nvt-se
f4d19560fc Fixed a performance problem by not allowing GC while doing merges of files and micro logs. 2010-02-08 14:08:14 +00:00
nvt-se
3c890c48a9 Added some comments to clarify how Coffee works internally 2010-01-19 16:18:34 +00:00
nvt-se
d2655eac7a make watchdog management slightly more abstract to simplify porting 2010-01-14 21:16:58 +00:00
nvt-se
8acea82207 Set a file mode in the third argument when calling open() with O_CREAT in
the flags. Required by IEEE Std 1003.1, 2004 Edition.
2009-08-10 09:50:55 +00:00
dak664
c1b7375a5a *** empty log message *** 2009-07-23 16:13:48 +00:00
nvt-se
62b380b0a6 Fixed a bug with reading to far in get_record index. Thanks to Darren Moore for reporting this. 2009-07-16 11:58:44 +00:00
nvt-se
906717a333 * isolate only pages in the last sector
* set max_pages to 0 when calling remove_by_page to prevent file starvation.
* when allocating files, only update next_free if the allocated file starts at next_free.

Thanks to Darren Moore (CSIRO) for suggesting the first two of the
three changes.
2009-07-09 22:16:22 +00:00
nvt-se
c872a86653 undo accidental enabling of debug output. 2009-06-29 13:33:12 +00:00
nvt-se
1e0ca9ceac Made the use of micro logs configurable to make file modifications
more efficient on storage types that support inline updates.

The sky platform uses logs, and the native platform uses no logs.
2009-06-29 13:30:16 +00:00
nvt-se
53a8acc49a cleared debug flag. 2009-06-10 15:13:37 +00:00
nvt-se
349e14abd4 fixed GC bug with big files and unwanted buffer overwrite bug. 2009-06-10 15:03:35 +00:00
nvt-se
d9b75b2fda stop the watchdog while merging. 2009-05-26 14:27:06 +00:00
nvt-se
88766d8740 use unsigned for sector count type. 2009-05-25 22:10:04 +00:00
nvt-se
2978270e43 decreased the code size to less than 5000 bytes. (msp430 code)
improved clarity in read and write code.
added negative offset check in cfs_seek().
removed unnecessary multiplication.
2009-05-13 13:27:19 +00:00
nvt-se
995e788d73 Fixed append->modify->append bug.
Approximately doubled the speed of file reservations.

Reduced the compiled code size by about 100 bytes by removing redundant code.
2009-05-11 16:35:49 +00:00
nvt-se
55ec3093ec removed complicated and mostly unused EOF hint code. 2009-05-04 22:30:32 +00:00
nvt-se
8e52b1bcfd made the documentation more clear. 2009-05-04 22:29:48 +00:00
nvt-se
17fa2f1618 make sure that page isolation is called after erasing a sector in reluctant GC.
simplified the GC logic a bit.
2009-04-29 13:15:59 +00:00
nvt-se
3f205a1413 reluctant gc will now wait until the sector has no free pages
before erasing the sector.
2009-04-13 22:26:31 +00:00
nvt-se
4507891ed5 made gc on removal configurable since it decreases wear levelling.
cleaned up some code.
2009-04-02 14:20:04 +00:00
nvt-se
1425537a13 Introduced two garbage collection mode: greedy and reluctant.
The greedy GC mode attempts to erase as many sectors as possible, and
it is therefore a slow operation, since the flash driver must wait
for about a second after erasing one sector. The former behavior was
to always do a greedy GC if file reservations fails due to lack of space.

The new reluctant GC stops after erasing one sector, and therefore
we often do not have to wait if there is no file system operation
in the time while the sector is being erased. We call the garbage collector
using this mode when removing a file that is not a micro log file, since
the remove function is called recursively for micro log files that are
erased because the corresponding ordinary file is erased.

This change increases the coffee test (examples/sky/test-coffee.c) speed
from 9 to 5 seconds.
2009-04-02 11:22:23 +00:00
nvt-se
6a6bb53f2e merged files must always inherit the old file end. 2009-03-26 15:57:52 +00:00
nvt-se
04ccf215e4 dereference gc_wait 2009-03-26 15:45:55 +00:00
nvt-se
8785bee644 avoid repetitive garbage collection if no files have been deleted since
the last try.
2009-03-26 12:36:10 +00:00
nvt-se
bffbb06d4a corrected GC page isolation loop.
adjusted cfs_coffee_reserve signature to use cfs_offset_t instead of uint32_t.
made cfs_coffee_format also to clear *next_free.
2009-03-20 15:15:43 +00:00
nvt-se
b7bdfe8daf bugfixes:
* set invalid page on all removed files which have cache entries.
* update file cache entries earlier to prevent overwrites.
2009-03-19 20:44:43 +00:00