nuttx/fs
Jukka Laitinen 26b7de0f34 fs/fat: Fix number of data clusters usable for fat driver
Fix the issue where fat driver is not using the last two clusters in
the file system.

The fat parameter fs->fs_nclusters is the maximum number of data clusters;
this doesn't include the two in the beginning. Many checks in the fat driver
treat the fs->fs_nclusters-1 as being the last accessible cluster, which is not
right, the last accessible one is actually this number + 2 when the cluster
count includes the two first ones.

Normally this is not an issue when writes are being done through the same
driver, the last two clusters are just never used. But if the filesystem is
modified by external driver, for example with a populated fat created with PC,
or modifying the FS via USB-MSC, this leads to the fat driver not being able to
read anything that uses the last two clusters.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-12-22 11:09:12 +01:00
..
aio
binfs Fix the wrong comment banner 2023-12-03 17:50:35 +01:00
cromfs Documentation: remove all migrated READMEs 2023-10-29 21:03:54 -03:00
driver rpmsgblk: bind block inode to ept when create ept 2023-11-22 08:08:12 -08:00
fat fs/fat: Fix number of data clusters usable for fat driver 2023-12-22 11:09:12 +01:00
hostfs
inode fs/proc: Fix groupfd to get fd by group instead of current tcb 2023-12-04 21:37:28 -08:00
littlefs
mmap Documentation: remove all migrated READMEs 2023-10-29 21:03:54 -03:00
mount fs_gettype:add zipfs magic 2023-12-08 21:45:45 -03:00
mqueue poll: pollsetup should notify only one fd passd by caller 2023-11-21 09:07:17 +01:00
nfs Fix the wrong comment banner 2023-12-03 17:50:35 +01:00
nxffs Fix the wrong comment banner 2023-12-03 17:50:35 +01:00
partition
procfs sched/procfs:use instrument to statistics run time max stack 2023-12-11 02:06:51 -08:00
romfs Fix the wrong comment banner 2023-12-03 17:50:35 +01:00
rpmsgfs Kconfigs: rename {Rpmsg|rpmsg} to RPMGS 2023-10-28 13:58:56 +08:00
semaphore sched/semaphore: Move named semaphores to user space 2023-11-27 04:52:54 -08:00
shm
smartfs Fix the wrong comment banner 2023-12-03 17:50:35 +01:00
socket
spiffs Fix the wrong comment banner 2023-12-03 17:50:35 +01:00
tmpfs Fix the wrong comment banner 2023-12-03 17:50:35 +01:00
unionfs Documentation: remove all migrated READMEs 2023-10-29 21:03:54 -03:00
userfs
vfs poll: pollsetup should notify only one fd passd by caller 2023-11-21 09:07:17 +01:00
zipfs
CMakeLists.txt
fs_initialize.c
Kconfig
Makefile