Re: jffs on non-MTD device?

David Woodhouse (dwmw2@infradead.org)
Fri, 25 May 2001 09:44:10 +0100


pavel@suse.cz said:
> I'm trying to run jffs on my ATA-flash disk (running ext2 could kill
> some flash cells too soon, right?) but it refuses:

CompactFlash does wear levelling internally.

> if (MAJOR(dev) != MTD_BLOCK_MAJOR) {
> printk(KERN_WARNING "JFFS: Trying to mount a "
> "non-mtd device.\n");
> return 0;
> }

> What are reasons for this check?

JFFS doesn't actually use the block device interface. Specifying it in the
mount command is simply a hack to make life easier, which nobody's yet
managed to obsolete. We actually use the underlying MTD device:

mtd = get_mtd_device(NULL, MINOR(dev));

If you want JFFS (or JFFS2) on a CF device - in the apparent absence of any
other relatively low overhead, compressing, journalling file system to use
on it - then you need to provide a translation driver similar to the mtdram
one which fakes an MTD device, using a block device as backing store.

--
dwmw2

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/