Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS_LARGEFILE config disabled is causing issue with df -h output. #8933

Open
dlukian opened this issue Mar 31, 2023 · 4 comments
Open

FS_LARGEFILE config disabled is causing issue with df -h output. #8933

dlukian opened this issue Mar 31, 2023 · 4 comments

Comments

@dlukian
Copy link

dlukian commented Mar 31, 2023

I am using the cxd56xx board. Installing 32GB SDHC card into the system, formatted FAT32 and running df displays correct block size, block number, and remaining blocks adding up to correct volume. Using -h parameter outputs incorrect Size and Available columns. Recent Spresense SDK update adapted Nuttx 11.0.0, and FS_LARGEFILE is now disabled by default. Manually enabling FS_LARGEFILE allows correct display of total and remaining memory with df -h option. Perhaps the -h option calculation is using incorrect parameters that have to do with the maximum file size instead of actual mounted media volume?

@laoniaokkk
Copy link
Contributor

When disable FS_LARGEFILE, the max size is 2^32 = 4GB. So when use the SD card > 4GB, you should enable FS_LARGEFILE.The same as USB msc device

@acassis
Copy link
Contributor

acassis commented Apr 5, 2023

Good point @laoniaokkk it is not a BUG! Maybe we should select FS_LARGEFILE automatically when enabling SD/MMC driver because probably most of users will be using a SDCard bigger than 4GB.

@dishilov
Copy link

dishilov commented Apr 5, 2023

@acassis @laoniaokkk I was under impression the 'df' command has nothing to do with file sizes and is used to display volume information - which it does correctly when used without '-h' option. Is the option not supposed to convert the block+block size data to human readable format only?

@PetervdPerk-NXP
Copy link
Contributor

@davids5 FS_LARGEFILE is for files not for partition size although it bugs out the partition size display value.

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

No branches or pull requests

5 participants