Resurrect/enhance delta image code. Another multi-day "one hour hack"!
Resurrect: get the basic signature matching code working again. Enhance: add -U option to have imagezip update (or create) the signature file. Previously, the signature file was created off-line on boss with the imagehash command (that would be Mike's "imagehash" (/usr/testbed/bin/imagehash) and not Leigh's "imagehash" (/usr/testbed/sbin/imagehash)). Creating it as we create the image makes a lot of sense...except for how we do it. We actually read and create the hashes as a separate pass before we re-read, compress, and create the image--so we read the disk twice. [This is primarily because we are mooching off of the existing hash checking code (-H option). Doing this right will require re-writing The Big Loop which makes a single pass through the data, simultaneously dealing with disk IO, allocated ranges, and compression blocks all of which have different size/alignment criteria. But I digress...] Anyway, reading the disk data twice sucks, but at least it is on the client and not on boss. The take away is: don't create your images on pc600s. Note that -U will always create a signature file for the complete disk or partition even when you are creating a delta image (i.e., when combined with -H). Enhance: add "-P <pct>" option, used with -H, which tells imagezip that if a resulting delta image would be over <pct> percent the size (where size is number of uncompressed sectors in the image) of a full image, then just create a full image instead. So "-P 50" says if it would be over half the size, "-P 200" says if it was over twice the size, etc. If you always want a delta image to be produced, use -H without -P. If you always want a full image, don't use -H. This is part 2 of supporting images. Part 1 is the DB and user interface changes that Leigh is working on. Part 3 is next up and involves modifying the image creation MFS to download and use signatures along with the new imagezip when creating images. Stay tuned.
Showing
- clientside/os/imagezip/GNUmakefile.in 4 additions, 4 deletionsclientside/os/imagezip/GNUmakefile.in
- clientside/os/imagezip/TODO 13 additions, 2 deletionsclientside/os/imagezip/TODO
- clientside/os/imagezip/global.h 5 additions, 1 deletionclientside/os/imagezip/global.h
- clientside/os/imagezip/hashmap/hashmap.c 538 additions, 252 deletionsclientside/os/imagezip/hashmap/hashmap.c
- clientside/os/imagezip/hashmap/hashmap.h 7 additions, 18 deletionsclientside/os/imagezip/hashmap/hashmap.h
- clientside/os/imagezip/imagehash.c 82 additions, 22 deletionsclientside/os/imagezip/imagehash.c
- clientside/os/imagezip/imagehash.h 11 additions, 3 deletionsclientside/os/imagezip/imagehash.h
- clientside/os/imagezip/imagehdr.h 8 additions, 8 deletionsclientside/os/imagezip/imagehdr.h
- clientside/os/imagezip/imagezip.c 266 additions, 53 deletionsclientside/os/imagezip/imagezip.c
- clientside/os/imagezip/range.h 35 additions, 0 deletionsclientside/os/imagezip/range.h
Loading
Please register or sign in to comment