Re: small nftl fix

David Woodhouse
2000-10-18T16:46:02Z

kundrat@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