xiaoxiang781216 commented on code in PR #16817: URL: https://github.com/apache/nuttx/pull/16817#discussion_r2258727305
########## Documentation/components/filesystem/littlefs.rst: ########## @@ -4,3 +4,26 @@ LITTLEFS A little fail-safe filesystem designed for microcontrollers from https://github.com/littlefs-project/littlefs. + +In NuttX, littlefs can be interacts with through the virtual file system. This +means that it can be used normally with ``read()``, ``write()``, etc. calls, as +well as file operations (``fopen()``, ``fclose()``, etc). + +.. note:: + + Since littlefs is power-fail safe and must commit writes before they are + permanently stored (corruption prevention mechanism), it is required to + periodically call ``fsync`` on the file to commit your writes. The exact + semantics of when littlefs files are committed are discussed in `this issue + <https://github.com/apache/nuttx/issues/15840>`_. + + +..note:: + + If your littlefs setup is experiencing crashes when you boot, try + troubleshooting by tweaking the ``BLOCK_SIZE_FACTOR`` options in Kconfig. + +.. warning:: + + The littlefs support on NuttX only works with block drivers, for storage + devices such as flash chips, SD cards and eMMC. Review Comment: it isn't good for SD cards/eMMC ########## Documentation/components/filesystem/littlefs.rst: ########## @@ -4,3 +4,26 @@ LITTLEFS A little fail-safe filesystem designed for microcontrollers from https://github.com/littlefs-project/littlefs. + +In NuttX, littlefs can be interacts with through the virtual file system. This +means that it can be used normally with ``read()``, ``write()``, etc. calls, as +well as file operations (``fopen()``, ``fclose()``, etc). + +.. note:: + + Since littlefs is power-fail safe and must commit writes before they are + permanently stored (corruption prevention mechanism), it is required to + periodically call ``fsync`` on the file to commit your writes. The exact + semantics of when littlefs files are committed are discussed in `this issue + <https://github.com/apache/nuttx/issues/15840>`_. + + +..note:: + + If your littlefs setup is experiencing crashes when you boot, try + troubleshooting by tweaking the ``BLOCK_SIZE_FACTOR`` options in Kconfig. + +.. warning:: + + The littlefs support on NuttX only works with block drivers, for storage Review Comment: why block driver, not mtd driver -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org