Please help, nftl question

Luca Contini luca.contini at mediaenabling.com
Mon Jun 30 06:37:04 EDT 2003


Hi David,
thank you very much for your help.
Things are definitely much clear now.
I'v been looking for 'struct mtd_blktrans_ops' but with no result.
Also for "include/mtd/blktrans.h" that I suppose is
"include/linux/mtd/blktrans.h", but I can't find any "blktrans.h".
Right now I'm trying to understand the code for mtdblock.

Regards

Luca

----- Original Message -----
From: "David Woodhouse" <dwmw2 at infradead.org>
To: "Luca Contini" <luca.contini at mediaenabling.com>
Cc: "linux-mtd-request at lists.infradead.org" <linux-mtd at lists.infradead.org>;
"Barone Tonino" <tonino.barone at tecneitalia.com>
Sent: Friday, June 27, 2003 10:16 AM
Subject: Re: Please help, nftl question


> On Fri, 2003-06-27 at 09:14, Luca Contini wrote:
> > Hi,
> > which is difference between nftlcore and nftlmount ?
>
> nftlmount is the code which does and examines a flash device, looking
> for signs of the NFTL format on it, and then builds up all the relevant
> data structures for the NFTL code.
>
> nftlcore is the code which actually handles read/write access to the
> translation layer.
>
> You don't really need to worry about this -- it just seemed slightly
> nicer to split it NFTL two files. FTL and mtdblock are not split.
>
> > What kind of functions should SFTL export so that a filesystem can be
put
> > on?
>
> You need to provide a 'struct mtd_blktrans_ops', as defined in
> include/mtd/blktrans.h and implemented in mtdblock.c
>
> Don't look at NFTL, it'll just confuse you. Look at mtdblock.c instead.
>
> Take a copy of it, make the read and write functions just return errors.
> Add code to your 'add_mtd' routine to go and check for a valid
> SmartMedia TL on any device which is added. Then make the read function
> work properly -- finding the appropriate part of the flash containing
> whichever 'logical' block number is requested, and reading it.
>
> Then move on to writing...
>
> --
> dwmw2
>
>
>
>





More information about the linux-mtd mailing list