jido
I finally changed the subject, this has nothing to do with Rsync...
On Tue, Mar 06, 2001 at 01:07:04PM +0100, J.A. Bezemer wrote:
> > > (Since positions and md5sums of individual files in the image are
> > > known, I could imagine some "jido-file check-all-files-in-this-image"
> > > tool ;-)
> >
> > I was thinking of having jido-file do the MD5 check automatically for
> > each file as it is being written to the image. If the MD5 sum doesn't
> > match, the file will never be marked as copied-to-image.
>
> You mean sync()ing after each write and checking by re-reading
> directly from the image? That would get _very_ slow. And it's quite
> a bit overdone too, since there usually won't be any problem and
> checking the md5sum of the entire finished image will be enough. So
> if you implement anything like this, put it under a non-default
> switch.
No, that check is not done by re-reading from the image: A file is
copied to the image in chunks. Each chunk is read from the original
file into a buffer by jido-file, then the buffer contents are written
to the image. The MD5 sum can be created from the buffer contents with
only a /fairly/ small overhead, much smaller than re-reading the data.
A small disadvantage of this is that only the files and not the
complete image are checked. However, all the individual parts making
up the image *are* verified: The files are, and the template data is
checked internally by zlib when it is unpacked. (using Adler32 - not
the best of CRCs, but sufficient for our purpose)
I would definitely like to make this the default mode of operation.
People who perform a final MD5 check of the whole image at the end can
switch the individual file checks off, yes. (But if they do, they'll
never know just which one of the files is the culprit, *if* the image
turns out to be corrupted.)
[snip]
Cheers,
Richard
--
__ _
|_) /| Richard Atterer | CS student at the Technische | GPG key:
| \/¯| http://atterer.net | Universität München, Germany | 888354F7
¯ ´` ¯
Reply to:
- Follow-Ups:
- Re: jido
- From: "J.A. Bezemer" <costar@panic.et.tudelft.nl>