Duplicate blocks in flash disk
ali nasir
supremenasir at yahoo.com
Thu Nov 17 05:08:00 UTC 2011
Hi,
We are using the RFS on the flashdisk. Sometimes we observe that when the rtems_flashdisk_initialize (which is called from the rtems_io_register_driver) is called, there are some prints on the console which says:
fdisk:error:duplicate block: 0-0-104: duplicate: 0-0-108
fdisk:error:duplicate block: 0-0-104: duplicate: 0-0-112
Since the return value of rtems_io_register_driver() is still 0, the mounting continues further in our code and the code crashes in the function rtems_rfs_buffer_handle_request(). This crash happens only when the above error of duplicate blocks is seen.
When we see the RTEMS code, we found that even if the duplicate blocks are found, the return value of rtems_fdisk_recover_block_mappings() is still 0. This makes the code feel that everything is fine and the mounting can continue.
Is is OK, that we return some error if the duplicate blocks are found in the rtems_fdisk_recover_block_mappings() function? This can help in making some recovery like erasing the Flash device completely or some other thing.
Please guide.
Regards,
Ali
More information about the users
mailing list