Overwriting of device block size from fat_init_volume_info

ali nasir supremenasir at yahoo.com
Sun Apr 20 02:18:11 UTC 2014


Hi,

In the RTEMS4.11 i see that the block device's block size is overwritten in the rtems_disk_device depending on the cluster size or the alignment of the block device.

We are migrating from 4.10.2 to 4.11. The block device we use is SD card. The ioctl just checks for the bufnum field and reads those number of blocks from the device. However, in the rtems4.11, with one particular SD card, the fat overwrites the block size to 4K from 512. But the ioctl is not aware of the same. Hence when the FAT tries to read a single block, it assumes that it will get 4K of data. But the ioctl just sends out 512 bytes to the FAT layer. 


How should i take care of the overwriting of the block size by FAT? The block device is created,at start up, with a block size of 512. Should the ioctl check the block size in the rtems_disk_device pointer which the ioctl receives?

This change in the fat_init_volume_info (to rewrite the block size) should be there in the release notes as there is a chance that the ioctl's, which were working with 4.10, may fail with 4.11.

-Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20140419/26a6a4de/attachment.html>


More information about the users mailing list