Add support for multiple instances of a file system by
making use of mount point as the disk volume name which
is used by the file system library while formatting or
mounting a disk.
Also moved out file system specific data structures from
public fs.h header and handled them in corresponding
file system interface files by introducing open files and
open directories concept which is already being used in
NFFS interface module. Now it is extended to FatFs as well.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Extend storage_dev type beyond 'struct device' by changing
the variable type to void pointer. This will be needed if we
have additional transactional layers b/w filesystem and the
actual backend device.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
The NFFS partition at the end of flash is also useful for any other
file system or even the Flash Circular Buffer (FCB). Rename the
partition from 'nffs_partition' to 'storage_partition' and make it
depend on a new hidden Kconfig entry which the relevant users will
select (such as NFFS and FCB).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The implementation for the tell() primitive was attempting to unlock
the NFFS mutex after returning an error code.
Coverity-Id: 185283
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Add support for Virtual File system Switch (VFS) by
introducing mount point concept to Zephyr. This allows
the applications to mount multiple file systems at
different mount points (ex: "/fatfs" and "/nffs"). The
mount point structure contains all the necessary info
required to instantiate, mount and operate on file system.
Decouple applications from directly accessing individual
file systems API's or internal functions by introducing
file system registration mechanism in VFS.
Move the file system defination and mount responsibility
to application so that application can decide which file system
to use and where to mount.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
This patch adds filesystem interface implementation for NFFS.
Default configuration for mem slabs sizes are the same as in Mynewt.
Origin: Original
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>