All,
At the end of each day, I spend a portion of my 5 minutes of free time
thinking about the SmartFS journaling and JFFS3 (as of yesterday). Not
being a licensing expert, I had wondered if it would be possible to
back-port the Samsung journaling changes to the NuttX code base. It
isn't clear to me at what point type type of port starts to break the
Apache license. There are also some CONFIG_SMARTFS_JOURNALING additions
in the MTD layer as well (see
https://git.tizen.org/cgit/rtos/tinyara/tree/os/fs/driver/mtd/smart.c
for those changes). I haven't studied the journaling changes in depth
to understand them yet, but as Greg said, I suspect it wouldn't take
much to back-port this logic and test it.
As far as a filesystem inspired by JFFS3, that would be a rather large
undertaking. First of all, the JFFS3 document referenced describes some
solutions for the scaleablility of JFFS2, but also raises just about as
many questions as it solves. There is really no description of how to
handle wear-leveling or bad sector management. Is the presumption made
that it would mimic JFFS2 in these areas? Is that adequate and
compatible with the JFFS3 changes proprosed? Can a transactional model
be added relatively easily? What would NOR in-place write optimiztions
look like algorithmically. These are all questions that would need to be
addressed in a more complete spec I think.
Also, looking at the test reports from the user-mode JFFS3
implementation that was implemented, the RAM usage is measured in number
of 100's of KB. I suppose for larger embedded systems with 4-8 MByte
SRAM available, this is okay, but not for a microcontroller based
solution such as STM32F4xxx with 192K total SRAM (for instance). It
isn't clear wht the SRAM requirement would be for a smaller NOR-based FLASH.
Having said all of this, it does seem that NuttX needs a filesystem that
is capable of running on NAND flash. I had some ideas about how to
implement this in SmartFS, but never had the time to persue it
completely. Knowing how involved filesystem development can be, I would
have to give it a bit more thought in my "free time" before deciding to
lead such an effort.
Ken
Post by ***@yahoo.com [nuttx]An alternative, worthy effort would be to backport the journaling that
was added to the existing SmartFS from the Samsun Tiven code base.
This would be a pretty simple, porting job... probably only a few days
of effort.
https://git.tizen.org/cgit/rtos/tinyara/tree/os/fs/smartfs/smartfs_smart.c
The part that needs to be ported is contained within
CONFIG_SMARTFS_JOURNALING and so should be easy to extract.
Samsung modified the license to Apache, but we would not not taking
their code, only some conditional logic that we reimplement. Also Ken
Pettit is the copyright holder of all of SmartFS files and has
complete say in the licensing of any release.
Note also that you cannot do any direct comparisons between NuttX and
TinyARA files because they also reformatted the files to a different
coding standard. Perhaps if you ran both the NuttX and TinyARA
versions of the files through tools/indent.sh, they might be
comparable with diff.
Greg