Skip to content

Commit

Permalink
fs: jffs2: Move SYS_JFFS2_SORT_FRAGMENTS to Kconfig
Browse files Browse the repository at this point in the history
Move the symbol SYS_JFFS2_SORT_FRAGMENTS to Kconfig and use the only
remaining part of doc/README.JFFS2 that is still relevant and useful to
the help for this option.

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
  • Loading branch information
trini committed Nov 10, 2022
1 parent e020b97 commit 3b677dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 30 deletions.
30 changes: 0 additions & 30 deletions doc/README.JFFS2

This file was deleted.

12 changes: 12 additions & 0 deletions fs/jffs2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,15 @@ config JFFS2_NAND
depends on FS_JFFS2
help
Enable support for NAND flash as the backing store for JFFS2.

config SYS_JFFS2_SORT_FRAGMENTS
bool "Enable JFFS2 sorting of filesystem fragments (SLOW!)"
depends on FS_JFFS2
help
If you boot from a partition which is mounted writable, and you
update your boot environment by replacing single files on that
partition, you should also define CONFIG_SYS_JFFS2_SORT_FRAGMENTS.
Scanning the JFFS2 filesystem takes *much* longer with this feature,
though. Sorting is done while inserting into the fragment list,
which is more or less a bubble sort. That algorithm is known to be
O(n^2), thus you should really consider if you can avoid it!

0 comments on commit 3b677dc

Please sign in to comment.