On Mon, 2007-03-05 at 20:18 +0900, Ken'ichi Ohmichi wrote:
Hi Bob,
In the above patch, a user cannot distinguish between the original
unaccessable pages and the excluded pages.
I think that the crash utility should display the warning message
to mean "These pages are excluded by partial dump" when it accesses
the excluded pages.
I'm not sure how to do this. I think it will require modifying memory.c
in crash to accept another type of return value from read_diskdump,
maybe?
I think it is good that disk_dump_header.header_version will be
changed
from 0 into 1. The existing crash doesn't check header_version.
If the existing crash tries to read a new dumpfile (header_version==1),
it considers the excluded pages as the zero-filled pages and it can
read a new dumpfile, and a new crash can distinguish the excluded pages.
That sounds like a great way to fix the compatibility issue.
For the above, I created the attached patch (for makedumpfile-1.1.1).
Could you say the opinion ?
I didn't even think of pointing multiple page descriptors at a single
zero page. That looks a lot cleaner than dropping in compressed zero
pages like I was doing. I like it. Good idea!
I have one minor comment with your method. I think it might be better
to memset the data buffer to zero just before writing it, instead of
using calloc to allocate it up front and counting on it to still be zero
when you get to the DL_EXCLUDE_ZERO if block. Some future programmer
might use buf in between the calloc and the write_cache.
I attached a small patch that applies *after* your patch to 1.1.1 that
shows this.
Thanks,
Bob Montgomery