Peter?
This should answer your "zerofill" question.
Regards, Carl-Daniel
On 09.02.2008 22:13, ron minnich wrote:
On Feb 9, 2008 1:06 PM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
If I read the code correctly, the command will try to fill the first occurrence of free space in the lar, not the biggest one. That means we might have to call it multiple times.
hmm. I obviously did not think of this.
And a general problem with the code: If it finds the offset of the first empty area, it checks whether the area is big enough. If not, it does not search for another empty area, but returns instead with an error.
Actually, I think as written it is broken for the general case of lots of empty spots. It should just look for the room left from start of empty space to next LAR header. It's just that I have never had a LAR that has more than one block of empty space, and that empty space is always at the gap before the bootblock.
How about this. I'd like to commit now, and then fix this later, as I really need this code in there for speed and it works fine with all "fresh" images built with v3.
Should we really call this "zerofill"?
"emptyfill"? I'll let it go for now but you make good point.
Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
OK, this is clearly a work in progress but even in this form it is so useful I'm going to commit it with a note, "This needs more work", and with luck someone else will improve it once we need it improved -- the basic structure is there.