doc2000 nftl[abcd] devices

David Woodhouse dwmw2 at infradead.org
Fri Jun 21 03:11:14 EDT 2002


brendan.simon at ctam.com.au said:
>  Does it make sense to put an nb_block_start in the NFTLRecord
> structure  or would it better to pass this information to the
> NFTL_mount() and  find_boot_records() functions.

> When reading information from nftlb, nftlbc, etc, how does the device
> driver know where the first block of the device is ? Does it need to
> know or does it use some of the other variables such as  EUN, VUN,
> etc.

In general, the MediaHeader block is the first block of the NFTL. The 
MediaHeader does contain information on the size of the NFTL, so in the 
case you described before, you should get the correct results.

Suggested plan for NFTL_setup is to start scanning at the beginning, 
calling find_boot_record(s, 0), then if find_boot_record finds one, then 
set it up accordingly and then call find_boot_record(s, <xxx>) again, where 
<xxx> is the sector after the end of the NFTL it just found.

Obviously you need to extend find_boot_record() to take a second argument
too. That's a two-line change.

--
dwmw2






More information about the linux-mtd mailing list