mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
fatfs: fstat - enable setting a custom preferred block size
Enables setting a custom st_blksize in fatfs vfs fstat function. Directly affects file buffer size for fatfs. Increasing the value helps with fread and fgets speeds, however increases heap usage. Added info to docs about improving I/O performance.
This commit is contained in:

committed by
Martin Vychodil

parent
7dd7498212
commit
16915556a3
@@ -600,6 +600,7 @@ static int vfs_fat_fstat(void* ctx, int fd, struct stat * st)
|
||||
st->st_mtime = 0;
|
||||
st->st_atime = 0;
|
||||
st->st_ctime = 0;
|
||||
st->st_blksize = CONFIG_FATFS_VFS_FSTAT_BLKSIZE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user