[PATCH 2.6.24] block2mtd: removing a device and typo fixes

Jörn Engel joern at logfs.org
Wed Feb 20 12:22:50 EST 2008


On Wed, 20 February 2008 17:02:31 +0000, Stephane Chazelas wrote:
> 
> sorry, I wasn't very clear.
> 
> With "loop", you're doing an ioctl() to /dev/loop<x> so that
> /dev/loop<x> become a block device associated with a given file.
> 
> Applying that strictly to block2mtd wouldn't make sense.
> 
> At the moment, when you create a new block2mtd, the only thing
> you see is an entry in /proc/mtd.
> 
> You don't access that mtd device directly (there's no
> /dev/mtd<x>). Instead, you may access it via a /dev/mtdblock<x>
> if you have "block2mtd" for instance.

Actually, there is /dev/mtd<x>.  Enable CONFIG_MTD_CHAR.

> Here, what you need, is an API that gets a block device (with fd
> or path) and an erase size and that returns a mtd identifier.

Erase size is a real difference, agreed.  Otherwise the loop analogy is
quite good.  Occasionally people are asking for file->mtd translation as
well.

Jörn

-- 
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918



More information about the linux-mtd mailing list