Skip to content

Add more needed options to CLI#160

Merged
BrianPugh merged 1 commit intojrast:masterfrom
amgross:add_cli_options
Feb 25, 2026
Merged

Add more needed options to CLI#160
BrianPugh merged 1 commit intojrast:masterfrom
amgross:add_cli_options

Conversation

@amgross
Copy link
Contributor

@amgross amgross commented Feb 24, 2026

PR for adding needed CLI options
most of them needed because they are stored in the superblock and compared upon init.
Inline max may improve flash usage in rare cases

@BrianPugh
Copy link
Collaborator

BrianPugh commented Feb 24, 2026

most of them needed because they are stored in the superblock and compared upon init.

Could you elaborate on this a bit more? I'm sure you're right, but I'm just trying to get in the right mindset 😄 .

Also maybe add comments then about why/when we would want to set these? Like is there any benefit in setting a lower attr_max?

I guess what i'm mainly looking for here is "what's the motiviation"

@amgross
Copy link
Contributor Author

amgross commented Feb 25, 2026

There are two questions about attr_max + name_max + file_max

  1. Why someone will want to set it:
    to ensure users not stuffing the filesystem with too big user attributes / file names / big files.
    this is nice but not important enough for adding to CLI (if user want he can use littlefs-python without CLI)
  2. Why it is important to add those parameters to CLI
    See https://github.com/littlefs-project/littlefs/blob/master/lfs.c#L4562 and all lines below it.
    each mount those parameters checked against their values stored on disk and if given values are higher than what on disk the mount will fail.
    hence for the none-create CLI those parameters may be critical to be able to mount if the drive is with the non-default values.
    for create it is important to be able to limit the user that will use afterward the created image on the real device.

Hope it is clear now, if not feel free to ask

@BrianPugh
Copy link
Collaborator

makes sense, thank you!

@BrianPugh BrianPugh merged commit 7fa189d into jrast:master Feb 25, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants