zephyr/include/fs
Peter Bigot 8ea2956ca3 fs: littlefs: revise how per-file cache memory is allocated
Originally the file cache used a mem_pool, but that data structure has
been deprecated and replaced by a heap that includes metadata in the
heap area.  As a result attempts to allocate all blocks will fail
because some of the reservation intended for cache data is now holding
metadata instead.

It's not immediately clear how to adjust the required heap size to
support this metadata as it depends on heap chunk units and data
structures that are not visible to the application.  Experimentally a
value of 24 bytes works, while smaller values do not.

Further the previous Kconfig API to configure the allocation pool is
completely inappropriate with the new heap data structure which has
such different behavior.

So: Deprecate the old Kconfig API.  Add a new Kconfig option to
directly control the cache size.  Infer a default cache size that
works with the old mem_pool parameters assuming a per-block overhead.
But to avoid wasted memory use the heap allocation only when the
application customizes the size, and use a slab in other cases.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-02 07:15:17 -05:00
..
fcb.h fs/fcb: Enable FCB to work with non-0xff erase value flash 2020-11-16 13:39:04 +01:00
fs_interface.h fs: Add fs_file_t_init() function 2021-01-29 08:04:51 -05:00
fs_sys.h fs: Move fs_file_system_t declaration out of fs.h 2020-10-23 12:55:41 +02:00
fs.h fs: Add fs_file_t_init() function 2021-01-29 08:04:51 -05:00
littlefs.h fs: littlefs: revise how per-file cache memory is allocated 2021-02-02 07:15:17 -05:00
nvs.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00