Ok, here we go....a test version for some delta chd features.
Disclaimer: This is not an official release, it's just a 64bit cmpro exe file which can replace yours. Do it on your own risk. Any chd convert/revert operation, you do it on your own risk.
What are the delta chd features (screenshots here:
https://www.emulab.it/forum/index.php?topic=9148.msg25902#msg25902) ?
In Settings->Compressor...->CHDMan, you find a new section "Delta CHDs". It also holds two new command line boxes for converting and reverting. They are filled with the default copy operations, don't change them.
The section holds options where you can decide if cmpro
- should warn you about chds which can be converted to deltas
- chds which are deltas
- or you don't want to see any warnings at all (default).
There is also a checkbox (ticked by default) which enables backup when a convert/revert operation actually takes place.
After running a (new) scan and having a warning option enabled, you might see warnings in the warnings window below the scanner. It can list something like:
- Non-delta chd: some.chd Convertable via someother.chd ( showed warning about non-delta chds )
- Delta chd: some.chd Revertable via someother.chd (showed warning about delta chds)
- Bad parent delta chd: some.chd Revertable via someother.chd (error: parents can't be deltas)
- Bad clone delta chd: some.chd Revertable via someother.chd (error: the delta clone uses a different chd than the current parent)
- Can't convert/revert some.chd. Can't find a non delta CHD with SHA1: somesha1 (error: parent is not available)
If one or more of the messages are shown, you can use the popup contextmenu on one of the lines (you can also select multiple) and select one of the delta chd options in the menu. You can convert or revert all/selected. Depending on the selection you see either the one or the other or both options...
When selecting convert or revert, chdman is called and run in the background. If something went wrong or your used ctrl-c to exit chdman and you got multiple files in the queue, you will be asked if you want to continue.
If you ticked the backup option (you should), delta and absolute chds are copied to your backup folder. For this, subfolders are created in there _chd_abs_ and chd_delta_.
Known things:
- delta chds are always smaller? No, there are cases, especially when it comes to examples where the parent chd is a v4 baddump and the clone is a v5 chd, the delta version is slightly bigger
- when a chd is converted and reverted, I get the original file back? No, not necessarily. There are chds which were created with an older version of chdman and converting/reverting them with the current one ends up with a slightly smaller file. This is most likely based on the fact that the newer chdman uses a newer version of lzma which is responsible for the size loss. However, the raw data and its sha1 will be the same.
- when thinking about reverting, cmpro's unneeded/set check helps to find parent chds which might be located elsewhere or named incorrectly
- Can I convert all clone chds? If there is a belonging parent chd, yes (when CHD version is >= 3). Belonging? Well, there are sets which have more than one chd. To identify a belonging chd, the chd's "region" (and for software lists, the "part") information is used for a match. If a chd is not listed with a region/part, cmpro won't use it for any delta operations.
Well..happy testing...and don't forget: it's your fault when something goes wrong ;-)
Don't know if it's worth all the trouble....in times of multi terabyte HDs.....but the warnings might be useful.