Hello

I have been out of office for the Christmas/New Year period, so please forgive a delay in answering.

On Sat, Jan 12, 2019 at 6:19 PM Pham, Phong <phamp@ddc-web.com> wrote:

 

Hi,

 

I have a Linux newbie filesystem question. 

 

On Linux command line: mount -t yaffs2 /dev/ram2 /mnt/mtd

 

Where ram2 is a block device with major number RAMDISK_MAJOR, then yaffs2_mount() is executed.  (The consequence is failure but I am not interested in the failure.)

 

However, when a

mount -t yaffs2 /dev/mydevice /mnt/mtd

 

where mydevice is a block device with major number MTD_BLOCK_MAJOR, then yaffs2_mount() is not executed.  Linux couldn’t find an entry in the bdev_map->probe[MTD_BLOCK_MAJOR] (in genhd.c).  Is this because I don’t have a MTD Chip Driver installed for YAFFS2 MTD “user” module?  (I currently do not have the driver yet; just experimenting right now.)


The mtd "block devices"  are a bit of a cheat way to pass access to the mtd drivers to a flash file system. Yaffs needs flash drivers, not generic block drivers. Hence, Yaffs will only succeed mounting an mtd block device.

If you want to experiment on a system that does not have flash memory and an mtd block device, then you can use nandsim instead. This makes a fake mtd block driver that is backed by memory, but still provides all the mtd access functions.

For an example of how to do this, have a look in the yaffs2/linux-tests directory at the initnandsim script.



 

During initialization, I do see init_mtdblock() is invoked and major_names[MTD_BLOCK_MAJOR] is initialized (register_blkdev() is invoked), but bdev_map->probe[MTD_BLOCK_MAJOR] is not initialized.

 

Advise pls.,

Phong.

Notice: This e-mail and any files transmitted with it may contain Data Device Corporation's and its subsidiaries privileged and proprietary information. It is intended solely for the use of the individual or entity to whom it is addressed. If you are not the named recipient of this transmission, any disclosure, copying, distribution or reliance on the contents of this message is prohibited. If you received this e-mail in error, please destroy it and any attached files and notify me immediately.

Click Here to view our privacy statement.

_______________________________________________
yaffs mailing list
yaffs@stoneboat.aleph1.co.uk
http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs