Richard,
On Wednesday 21 March 2007 05:30, Richard Genoud wrote:
> I trace the code, and it seems that it's a problem with
> getting the partitioning information.
> I'm going to search in this way.
>
> here's the trace I get :
> mount -tyaffs2 /dev/mtdblock0 /mnt/mtd0
> into yaffs2_read_super_mtd
> into get_sb_bdev
> into open_bdev_excl
> into do_open
> -> get_gendisk : kobj_lookup returned NULL <-
> do_open : get_gendisk error
> open_bdev_excl : blkdev_get error
> open_bdev_excl error : IS_ERR(bdev) = -6
> get_sb_bdev result=-6
>
> mount: Mounting /dev/mtdblock0 on /mnt/mtd0 failed: No such
> device or address
>
> 2007/3/20, Charles Manning <manningc2@actrix.gen.nz>:
> > On Wednesday 21 March 2007 04:31, Richard Genoud wrote:
> > > mount -t yaffs2 /dev/mtdblock0 /mnt/mtd0/
> > > mount: Mounting /dev/mtdblock0 on /mnt/mtd0/ failed: No
> > > such device or address
> >
> > You are not getting any yaffs:xxx messages so it looks like
> > the call is being rejected by mount even before it gets to
> > call any specific yaffs code.
> >
> > You can also try turning on more yaffs tracing to see if
> > that helps.
Oh, how this rings a bell. I'm also using the Atmel AT91SAM926X
patches by on a 2.6.15 base and I had to hack the gendisk code.
These half-bread linux revisions are becoming quite ridiculous.
The whole /sys integration is half done and broken.
I had to remove the call to blk_register_queue() and
blk_unregister_queue() in block/genhd.c. See hack.
We only have/use MTD block devices.
-imcd
/**
* add_disk - add partitioning information to kernel list
* @disk: per-device partitioning information
*
* This function registers the partitioning information in @disk
* with the kernel.
*/
void add_disk(struct gendisk *disk)
{
disk->flags |= GENHD_FL_UP;
blk_register_region(MKDEV(disk->major, disk->first_minor),
disk->minors, NULL, exact_match, exact_lock, disk);
register_disk(disk);
#ifndef CONFIG_BSE_TWEAKS
blk_register_queue(disk);
#endif
}
EXPORT_SYMBOL(add_disk);
EXPORT_SYMBOL(del_gendisk); /* in partitions/check.c */
void unlink_gendisk(struct gendisk *disk)
{
#ifndef CONFIG_BSE_TWEAKS
// calling blk_unregister_queue for MTD block devs crashes in kobject_del
// call sequence:
// sys_delete_module > mod_exit > mtd_blktrans_exit > unregister_mtd_user >
// blktrans_notify_remove > mtdblock_remove_dev > del_mtd_blktrans_dev >
// del_gendisk > unlink_gendisk > blk_unregister_queue > kobject_unregister >
// kobject_del > sysfs_remove_dir
blk_unregister_queue(disk);
#endif
blk_unregister_region(MKDEV(disk->major, disk->first_minor),
disk->minors);
}