From f9d6cb70996d60cc8740db488cf0ea522ce2f89e Mon Sep 17 00:00:00 2001 From: Matus Fabo Date: Wed, 29 Sep 2021 14:24:10 +0200 Subject: [PATCH 1/4] add: spiffs issues documentation Issues documented: - SPIFFS is unable to utilize 100% of partition space - Long time between write function calls - Memory leaks when deleting file JIRA IDF-3776 --- docs/en/api-reference/storage/spiffs.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/en/api-reference/storage/spiffs.rst b/docs/en/api-reference/storage/spiffs.rst index e17bc1f06a..adebaf6934 100644 --- a/docs/en/api-reference/storage/spiffs.rst +++ b/docs/en/api-reference/storage/spiffs.rst @@ -14,6 +14,9 @@ Notes - Currently, SPIFFS does not support directories, it produces a flat structure. If SPIFFS is mounted under ``/spiffs``, then creating a file with the path ``/spiffs/tmp/myfile.txt`` will create a file called ``/tmp/myfile.txt`` in SPIFFS, instead of ``myfile.txt`` in the directory ``/spiffs/tmp``. - It is not a real-time stack. One write operation might take much longer than another. - For now, it does not detect or handle bad blocks. + - SPIFFS is able to reliably utilize only around 75% of assigned partition space. + - When the filesystem is running out of space, the garbage collector is trying to find free space by scanning the filesystem multiple times, which can take up to a few seconds per write function call, depending on required space. + - Deleting files does not always delete the whole file, which leaves unusable sections throughout the filesystem. Tools ----- From 3aad3fd38ff11c4b6a58945600e7375b616c37a9 Mon Sep 17 00:00:00 2001 From: Matus Fabo Date: Tue, 5 Oct 2021 15:37:49 +0200 Subject: [PATCH 2/4] Fix: grammatical & aesthetic changes JIRA IDF-3776 --- docs/en/api-reference/storage/spiffs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/api-reference/storage/spiffs.rst b/docs/en/api-reference/storage/spiffs.rst index adebaf6934..7986629fdf 100644 --- a/docs/en/api-reference/storage/spiffs.rst +++ b/docs/en/api-reference/storage/spiffs.rst @@ -15,8 +15,8 @@ Notes - It is not a real-time stack. One write operation might take much longer than another. - For now, it does not detect or handle bad blocks. - SPIFFS is able to reliably utilize only around 75% of assigned partition space. - - When the filesystem is running out of space, the garbage collector is trying to find free space by scanning the filesystem multiple times, which can take up to a few seconds per write function call, depending on required space. - - Deleting files does not always delete the whole file, which leaves unusable sections throughout the filesystem. + - When the filesystem is running out of space, the garbage collector is trying to find a free space by scanning the filesystem multiple times, which can take up to several seconds per write function call, depending on required space. + - Deleting a file does not always remove the whole file, which leaves unusable sections throughout the filesystem. Tools ----- From 3a150558a734fe5a6a4b2bfb03948c08ce13bc7e Mon Sep 17 00:00:00 2001 From: Matus Fabo Date: Thu, 7 Oct 2021 19:37:09 +0800 Subject: [PATCH 3/4] Fix: grammar correction IDF-3776 --- docs/en/api-reference/storage/spiffs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/api-reference/storage/spiffs.rst b/docs/en/api-reference/storage/spiffs.rst index 7986629fdf..63dcdd1104 100644 --- a/docs/en/api-reference/storage/spiffs.rst +++ b/docs/en/api-reference/storage/spiffs.rst @@ -15,7 +15,7 @@ Notes - It is not a real-time stack. One write operation might take much longer than another. - For now, it does not detect or handle bad blocks. - SPIFFS is able to reliably utilize only around 75% of assigned partition space. - - When the filesystem is running out of space, the garbage collector is trying to find a free space by scanning the filesystem multiple times, which can take up to several seconds per write function call, depending on required space. + - When the filesystem is running out of space, the garbage collector is trying to find free space by scanning the filesystem multiple times, which can take up to several seconds per write function call, depending on required space. - Deleting a file does not always remove the whole file, which leaves unusable sections throughout the filesystem. Tools From 9b3070105fc79ffeab87b750bb39b2413a26203b Mon Sep 17 00:00:00 2001 From: Matus Fabo Date: Thu, 7 Oct 2021 16:52:08 +0200 Subject: [PATCH 4/4] Add: references to issues JIRA IDF-3776 --- docs/en/api-reference/storage/spiffs.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/api-reference/storage/spiffs.rst b/docs/en/api-reference/storage/spiffs.rst index 63dcdd1104..a24694932b 100644 --- a/docs/en/api-reference/storage/spiffs.rst +++ b/docs/en/api-reference/storage/spiffs.rst @@ -15,7 +15,7 @@ Notes - It is not a real-time stack. One write operation might take much longer than another. - For now, it does not detect or handle bad blocks. - SPIFFS is able to reliably utilize only around 75% of assigned partition space. - - When the filesystem is running out of space, the garbage collector is trying to find free space by scanning the filesystem multiple times, which can take up to several seconds per write function call, depending on required space. + - When the filesystem is running out of space, the garbage collector is trying to find free space by scanning the filesystem multiple times, which can take up to several seconds per write function call, depending on required space. This is caused by the SPIFFS design and the issue has been reported multiple times (e.g. `here `_) and in the official `SPIFFS github repository `_. The issue can be partially mitigated by the `SPIFFS configuration `_. - Deleting a file does not always remove the whole file, which leaves unusable sections throughout the filesystem. Tools