Duplicate blocks during mounting of flash disk

ali nasir supremenasir at yahoo.com
Mon Nov 14 09:43:36 UTC 2011


Hi,

When i try to mount the RFS on a flash device, i get the following errors.

fdisk:error:duplicate block: 0-0-104: duplicate: 0-0-108
fdisk:error:duplicate block: 0-0-104: duplicate: 0-0-112

After this the code crashes in function rtems_rfs_buffer_handle_request() as it tries to access a write protected location and generates a bus error exception.

I use the below configuration and have 5 sectors of 64KB each allocated for the RFS. 
const rtems_flashdisk_config rtems_flashdisk_configuration[] =
{
  {
    block_size:         FLASHDISK_BLOCK_SIZE, //512
    device_count:       1,
    devices:            &device_descriptor[0],
    flags:              RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE,
    unavail_blocks:     0,
    compact_segs:       1,
    avail_compact_segs: 1,
    info_level:         0
  }
};

Changing compact_segs and avail_compact_segs to 100 also does not work.
Surprisingly, this same code used to work earlier, but now i see the above read errors and the crash. 
Can anyone guide why do we have those duplicate block prints?

Regards,
Ali



More information about the users mailing list