From 0a274639a8cbea3d370b89ac3dd53b226a25254d Mon Sep 17 00:00:00 2001 From: mofeifei Date: Wed, 20 Mar 2024 16:01:41 +0800 Subject: [PATCH] docs: update cn trans for spiffs.rst --- docs/en/api-reference/storage/spiffs.rst | 2 +- docs/zh_CN/api-reference/storage/spiffs.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/api-reference/storage/spiffs.rst b/docs/en/api-reference/storage/spiffs.rst index 5f06cc8ef4..285cc7b83a 100644 --- a/docs/en/api-reference/storage/spiffs.rst +++ b/docs/en/api-reference/storage/spiffs.rst @@ -16,7 +16,7 @@ Notes - 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. 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 `_. - - When garbage collector is attempting to reclaim space by scanning the entire filesystem multiple times (usually 10 times by default), during each scan, the garbage collector frees up one block if available. Therefore, if the maximum number of runs set for the garbage collector is 'n' (SPIFFS_GC_MAX_RUNS: locate this configuration option in `SPIFFS configuration `_), then n times the block size will become available for data writing. If you attempt to write data exceeding n times the block size, the write operation may fail and return an error. + - When the garbage collector attempts to reclaim space by scanning the entire filesystem multiple times (usually 10 times by default), during each scan, the garbage collector frees up one block if available. Therefore, if the maximum number of runs set for the garbage collector is 'n' (configured by the SPIFFS_GC_MAX_RUNS option located in `SPIFFS configuration `_), then n times the block size will become available for data writing. If you attempt to write data exceeding n times the block size, the write operation may fail and return an error. - When the chip experiences a power loss during a file system operation it could result in SPIFFS corruption. However the file system still might be recovered via ``esp_spiffs_check`` function. More details in the official SPIFFS `FAQ `_. Tools diff --git a/docs/zh_CN/api-reference/storage/spiffs.rst b/docs/zh_CN/api-reference/storage/spiffs.rst index c5fcfc34f5..6475977ba9 100644 --- a/docs/zh_CN/api-reference/storage/spiffs.rst +++ b/docs/zh_CN/api-reference/storage/spiffs.rst @@ -16,7 +16,7 @@ SPIFFS 是一个用于 SPI NOR flash 设备的嵌入式文件系统,支持磨 - 目前,SPIFFS 尚不支持检测或处理已损坏的块。 - SPIFFS 只能稳定地使用约 75% 的指定分区容量。 - 当文件系统空间不足时,垃圾收集器会尝试多次扫描文件系统来寻找可用空间。根据所需空间的不同,写操作会被调用多次,每次函数调用将花费几秒。同一操作可能会花费不同时长的问题缘于 SPIFFS 的设计,且已在官方的 `SPIFFS github 仓库 `_ 或是 ``_ 中被多次报告。这个问题可以通过 `SPIFFS 配置 `_ 部分缓解。 - - 被删除文件通常不会被完全清除,会在文件系统中遗留下无法使用的部分。 + - 当垃圾收集器尝试多次(默认为 10 次)扫描整个文件系统以回收空间时,在每次扫描期间,如果有可用的数据块,则垃圾收集器会释放一个数据块。因此,如果为垃圾收集器设置的最大运行次数为 n(可通过 SPIFFS_GC_MAX_RUNS 选项配置,该选项位于 `SPIFFS 配置 `_ 中),那么 n 倍数据块大小的空间将可用于写入数据。如果尝试写入超过 n 倍数据块大小的数据,写入操作可能会失败并返回错误。 - 如果 {IDF_TARGET_NAME} 在文件系统操作期间断电,可能会导致 SPIFFS 损坏。但是仍可通过 ``esp_spiffs_check`` 函数恢复文件系统。详情请参阅官方 SPIFFS `FAQ `_。 工具