From 97be116a39fee62b8f7027fd93d93789a6d04abb Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Fri, 17 Jul 2020 16:34:38 +0800 Subject: [PATCH] fs/nxffs: Fix scan good block slowly and scan an invalid block --- fs/nxffs/nxffs_initialize.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/nxffs/nxffs_initialize.c b/fs/nxffs/nxffs_initialize.c index 5695a72769..8491d6c85b 100644 --- a/fs/nxffs/nxffs_initialize.c +++ b/fs/nxffs/nxffs_initialize.c @@ -495,7 +495,11 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) } else { - offset += nerased + 1; + volume->ioblock += 1; + volume->iooffset = SIZEOF_NXFFS_BLOCK_HDR; + + offset = volume->ioblock * volume->geo.blocksize + + volume->iooffset; nerased = 0; } }