RFS on the RAM and Flash device

ali nasir supremenasir at yahoo.com
Tue Aug 23 12:31:48 UTC 2011


We would like to use the RFS(RTEMS File System) for our Flash Device and the RAM Disk. We have been using the RAMDISK 

with RTEMS4.9 with the MSDOS FS. But now we want to use the RFS.

With the RTEMS4.9, we used to configure the ramdisk with the following sequence:


msdos_format("/dev/ramdisk0", &format_request)	//Format needs to be done always at start up as the RAM is volatile
rtems_fsmount(fs_table, NULL)

The const char *type in the fs_table, for the MSDOS FS is &msdos_ops. If we switch to RFS, then this entry for the RTEMS4.10 should be RTEMS_FILESYSTEM_TYPE_RFS. Right?

Also, the msdos_format has to change to the rtems_rfs_format with the corresponding arguments to be passed to the rfs_format function.

We also want to use the RFS for the flash device which we have on board. But with the flash device, the format of the device should happen only once i.e when we run the SW for the first time on that device. This because, the data on the flash device in non volatile. How do we prevent this? Can someone help here?

Also, i have below doubts:
1. Is there a minimum size limit for the flash device? for eg is it possible to have the RFS implemented in a single 
sector of 64K size?
2. Is it true that the block size field in rtems_flashdisk_config is independent of the sector size of the flash device?
3. If suppose i have a flash device with 100 sectors and i intend to use only 2 sectors of the same, then do i have to 
set the member unavail_blocks to the equivalent block number which we do not use? 
4. What is the use of compact_segs and avail_compact_segs? Are they related to the device?


More information about the users mailing list