> > For example, if you backup a file which mostly contains empty blocks, > > you will duplicate the size of the resulting file! > > If describing an empty image takes more than a couple of bytes, you're doing > something seriously wrong.
really? > Because for that case it would be easy enough to > have an entry that just says "0 GB - 2 GB" is zero, and that's it. 16 bytes > for 2 GB > of virtual disk size, sounds pretty good to me. Zero region are distributed, not continuous, in most cases. > And it would only be needed if VMAs support backing files, because for normal > sparse blocks, I don't even see any reason why the VMA should contain any > information about them. They are never written to, so they are by definition > sparse. We track zero regions at 4K level, and Cluster size is 64K. So I normally just use 1bit to store information about empty blocks. I thought that is quite good, but you obviously have a better idea?