small nftl fix

David Woodhouse dwmw2 at infradead.org
Wed Oct 18 12:45:55 EDT 2000


kundrat at pkx.sk said:
> When writing to an empty fs on nftl, I always got garbled partition
> table. Looking at the nftl.c, there seems to be a problem with
> overwriting media header (which seems to be at the FirstPhysicalEUN).
> 

Sorry for the delayed response. Your patch looks good. However, I believe 
the spec allows the header units to be in places other than the first two 
physical units of the NFTL, so it would be better to make sure we don't use 
(EUN == nftl->MediaUnit || EUN == nftl->SpareMediaUnit) rather than 
hardcoding that to not use (EUN < nftl->MediaHdr.FirstPhysicalEUN + 2)

In practice, I don't really expect that to happen, but we might as well be 
pedantic in our adherence to the NFTL spec. 

In the meantime, could anyone else who's seen NFTL corruption please try 
Peter's patch?

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list