mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-11-01 16:50:46 +00:00
This prevents runaway O(n^2) behavior on devices with extremely large block sizes (NAND, bs=~128KiB - ~1MiB). The whole point of shrubs is to avoid this O(n^2) runaway when inline files become necessarily large. Setting FRAGMENT_SIZE to a factor of the BLOCK_SIZE humorously defeats this. The 512 byte cutoff is somewhat arbitrary, it's the natural BLOCK_SIZE/8 FRAGMENT_SIZE on most NOR flash (bs=4096), but it's probably worth tuning based on actual device performance.