Please help, nftl question

David Woodhouse dwmw2 at infradead.org
Fri Jun 27 04:16:07 EDT 2003


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