Skip to content

Commit

Permalink
fs: remove NFFS subsystem
Browse files Browse the repository at this point in the history
NFFS is removed as it has serious bugs (by design) which haven't
been resolved since extended range of time.
One of most serious issues bunch were described here:
apache/mynewt-nffs#10

Since lack of support NFFS upsterem it doesn't make sense to keep
it in zephyr.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
  • Loading branch information
nvlsianpu authored and carlescufi committed Jan 21, 2020
1 parent b61e6d3 commit c0aa294
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 740 deletions.
1 change: 0 additions & 1 deletion include/fs/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ enum fs_dir_entry_type {

enum fs_type {
FS_FATFS = 0,
FS_NFFS,
FS_LITTLEFS,
FS_TYPE_END,
};
Expand Down
2 changes: 1 addition & 1 deletion include/fs/fs_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
extern "C" {
#endif

#if defined(CONFIG_FILE_SYSTEM_LITTLEFS) || defined(CONFIG_FILE_SYSTEM_NFFS)
#if defined(CONFIG_FILE_SYSTEM_LITTLEFS)
#define MAX_FILE_NAME 256
#else /* FAT_FS */
#define MAX_FILE_NAME 12 /* Uses 8.3 SFN */
Expand Down
2 changes: 0 additions & 2 deletions subsys/fs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ if(CONFIG_FILE_SYSTEM)
zephyr_library_sources(fs.c fs_impl.c)
zephyr_library_sources_ifdef(CONFIG_FAT_FILESYSTEM_ELM fat_fs.c)
zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM_LITTLEFS littlefs_fs.c)
zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM_NFFS nffs_fs.c)
zephyr_library_sources_ifdef(CONFIG_FILE_SYSTEM_SHELL shell.c)

zephyr_library_link_libraries(FS)

target_link_libraries_ifdef(CONFIG_FAT_FILESYSTEM_ELM FS INTERFACE ELMFAT)
target_link_libraries_ifdef(CONFIG_FILE_SYSTEM_LITTLEFS FS INTERFACE LITTLEFS)
target_link_libraries_ifdef(CONFIG_FILE_SYSTEM_NFFS FS INTERFACE NFFS)
endif()

add_subdirectory_ifdef(CONFIG_FCB ./fcb)
Expand Down
64 changes: 0 additions & 64 deletions subsys/fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ config FAT_FILESYSTEM_ELM
help
Use the ELM FAT File system implementation.

config FILE_SYSTEM_NFFS
bool "NFFS file system support"
depends on FLASH_PAGE_LAYOUT
help
Enables NFFS file system support.
Note: NFFS requires 1-byte unaligned access to flash thus it
will not work on devices that support only aligned flash access.

config FILE_SYSTEM_LITTLEFS
bool "LittleFS file system support"
depends on FLASH_MAP
Expand Down Expand Up @@ -69,62 +61,6 @@ config FS_FATFS_NUM_DIRS
default 4
endmenu

menu "NFFS Settings"
visible if FILE_SYSTEM_NFFS

config FS_NFFS_FLASH_DEV_NAME
string "Flash device name to be used"

config FS_NFFS_NUM_INODES
int "Maximum number of inodes"
range 1 32768
default 100

config FS_NFFS_NUM_BLOCKS
int "Maximum number of blocks"
range 1 32768
default 100

config FS_NFFS_NUM_FILES
int "Maximum number of opened files"
range 1 256
default 4

config FS_NFFS_NUM_DIRS
int "Maximum number of opened directories"
range 1 256
default 4

config FS_NFFS_NUM_CACHE_INODES
int "Number of cached files' inodes"
range 1 512
default 4

config FS_NFFS_NUM_CACHE_BLOCKS
int "Number of cached blocks"
range 1 512
default 64

config NFFS_FILESYSTEM_MAX_AREAS
int "Maximum number of areas"
range 2 64
default 8
help
This defines maximum number of areas located on flash. Each area can
be erased without affecting other areas thus the size of area can
affect performance of GC where single area has to be rewritten.
At least one scratch and one non-scratch area is required.

config NFFS_FILESYSTEM_MAX_BLOCK_SIZE
int "Maximum block size"
range 16 2048
default 2048
help
This determines the maximum size of data block written to flash.
Writes larger than this size are split into multiple write operations.

endmenu

source "subsys/fs/Kconfig.littlefs"

endif # FILE_SYSTEM
Expand Down
Loading

0 comments on commit c0aa294

Please sign in to comment.