RTEMS | Ported LittleFS (!1064)
Harshit Shivhare (@002harshit)
gitlab at rtems.org
Wed Feb 18 11:51:13 UTC 2026
Harshit Shivhare commented on a discussion on cpukit/libfs/src/littlefs/rtems-littlefs-init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1064#note_142953
> + lfs_cfg->read = rtems_littlefs_bd_read;
> + lfs_cfg->prog = rtems_littlefs_bd_prog;
> + lfs_cfg->erase = rtems_littlefs_bd_erase;
> + lfs_cfg->sync = rtems_littlefs_bd_sync;
> + lfs_cfg->lock = rtems_littlefs_bd_lock;
> + lfs_cfg->unlock = rtems_littlefs_bd_unlock;
> +
> + lfs_cfg->block_size = RTEMS_LITTLEFS_BLOCK_SIZE;
> +
> + lfs_cfg->block_count =
> + (ctx->dd->size * ctx->dd->media_block_size) / lfs_cfg->block_size;
> +
> + lfs_cfg->read_size = lfs_cfg->block_size;
> + lfs_cfg->prog_size = lfs_cfg->block_size;
> + lfs_cfg->cache_size = lfs_cfg->block_size;
> + lfs_cfg->lookahead_size = 16;
I would like to know your opinion. I am confused whether to keep a constant block_size or just let the user define it.
One thing I would like to add is We do need the block_size of littlefs when mounting it and as far as I know we cant retrieve block_size until we mount it.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1064#note_142953
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260218/a0ea56c7/attachment-0001.htm>
More information about the bugs
mailing list