[ntar-workers] Seekable file layouts etc

Christian Kreibich christian at whoop.org
Mon Jul 11 20:47:02 GMT 2005


On Fri, 2005-07-08 at 08:48 -0700, Gianluca Varenni wrote:
>
> > I think once you detect corruption you simply have to start from the
> > last valid block and do a byte-by-byte scan and test whether the
> > parseable sequence of blocks looks decent, per the above. From that you
> > should be able to fix the block size fields in situ to restore correct
> > sequencing (if you don't want to duplicate a 5GB trace), or ...
> 
> If you can do this only if the corrupted block size is a multiple of 32 
> bits. Every block is aligned to 32 bits, and the block size in the header 
> tells the actual size of the block (i.e. without the padding used to reach a 
> 32bit aligned block). In any case, such corrupted block should be marked as 
> garbage using some reserved block type (in order to avoid headaches when 
> dissecting such blocks).

Hey I like that idea -- would it be okay to overwrite it with a garbage
marker block that needn't necessarily be 32-bit aligned? I think all
counters are still on byte units and not 32-bit words, right? I think it
would be very very nice if we could fix a file without having to
duplicate it.

Cheers,
Christian.
-- 
________________________________________________________________________
                                          http://www.cl.cam.ac.uk/~cpk25
                                                    http://www.whoop.org




More information about the ntar-workers mailing list