Skip to contentSkip to conversation

jffs on non-MTD device?

DISCUSSION Pavel Machek 3 participants 4 messages May 25, 2001 – Jun 11, 2001

lore
Share & tools
lore
#0 lore raw

Hi!

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

        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?

Pavel

Signature · 2 lines
I'm [email protected]. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [email protected]
#1 lore raw
Quoted 2 lines · [email protected] 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.

Quoted 7 lines
        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

#2 lore raw
In reply to Pavel Machek

Some (most?) CF disks have hareware wareleveling.
I use ext2 with e2compr patch.

Padraig.

Quoted 15 lines · Pavel Machek

Hi!

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

       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?

Pavel

#3 lore raw
Quoted 2 lines · [email protected] said:

Some (most?) CF disks have hareware wareleveling. I use ext2 with e2compr patch.

There are some who want a journalling filesystem on their CF device. Did anyone do e3compr yet? :)

Personally, I wouldn't bother with it - these things have a form of pseudo-filesystem, probably similar to FTL or NFTL, implemented internally to emulate a block device, and it's been reported that they don't do that particularly well - they break down and lose data if you put them through the kind of repeated power cycle tests that JFFS and JFFS2 have been subjected to. A journalling filesystem on an unreliable medium is sort of pointless.

Far better to use a real flash device. But maybe I'm biased :)

--
dwmw2