Commit Graph

7 Commits

Author SHA1 Message Date
Ramesh Thomas 97d8fd1748 fs: Add file system API to flush cache of an open file
This API flushes the cached data of an open file to the
storage media. This can be called after writes to avoid data
loss if power is removed unexpectedly.

Jira: ZEP-767
Change-Id: I0f99f2f34126aa8e6a43f69c7a1b6d903937de11
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-09-23 00:06:32 +00:00
Ramesh Thomas 524004d54b fs: Adds file system API to get volume statistics
Adds API to return volume statistics. This is similar to
fstatvfs() POSIX function but limited to total size, free space,
allocation unit size and optimal transfer block size.

Jira: ZEP-636
Change-Id: Ie9e7367b9164277875860c2d0e8de883b2fca07a
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-09-23 00:06:32 +00:00
Ramesh Thomas 211db5352d fs: Adds file system API to grow or shrink a file
Adds fs_truncate() function which can be used to change the size
of a file. The name is counter intuitive but that is how the POSIX
version is named. It shrinks as well as grows a file.

Jira: ZEP-635 ZEP-622
Change-Id: If7b8cad17e1b80479a529c60a32c12fb134cd456
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-09-23 00:06:31 +00:00
Ramesh Thomas 9237040302 fs: Fixes a bug that limits volume size to 1MB
The FS needs to be allowed to choose the correct allocation unit
size based on volume size. Current code passes a fixed value to
the function that creates the FS. Passing 0 allows the FS to configure
the required au size.

Jira: ZEP-898
Change-Id: Ic43bfba8b8f8498f4db49db744743afad4b118cd
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-09-16 02:21:00 +00:00
Kuo-Lang Tseng 57c760ad94 fs: Adds flash device support to diskio interface
Adds the flash device support for the file system storage media.
The implementation is generic for any flash device that implements
the flash API support.

Origin: original

Jira: ZEP-447
Change-Id: Ib89a6a64216cce1461da0bec6fa9588b97e06b41
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2016-08-02 00:47:14 +00:00
Ramesh Thomas e89c739e6f fs: Adds the glue layer for the Fat FS module
Adds the glue layer to interface the Fat FS module with Zephyr
file system API.

Origin: Original
Jira: ZEP-228 ZEP-483
Change-Id: I878fdad8ecaf46992d6163e24a9b0b633f49154f
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-01 16:47:33 -07:00
Ramesh Thomas cc74572c5b fs: Adds diskio interface
Adds the diskio interface for the FAT file system.  This
revision uses RAM to emulate disk storage.

Origin: Original
Jira: ZEP-285
Change-Id: I7a30c8761d5ed9b564f1d1e08482c5ef199d7372
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2016-08-01 16:46:38 -07:00