svn commit: r257813 - head/sys/powerpc/powerpc
Justin Hibbits
jhibbits at FreeBSD.org
Thu Nov 7 21:02:58 UTC 2013
Author: jhibbits
Date: Thu Nov 7 21:02:57 2013
New Revision: 257813
URL: http://svnweb.freebsd.org/changeset/base/257813
Log:
Clamp the dump block size to the dump device max I/O size.
Modified:
head/sys/powerpc/powerpc/dump_machdep.c
Modified: head/sys/powerpc/powerpc/dump_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/dump_machdep.c Thu Nov 7 20:54:52 2013 (r257812)
+++ head/sys/powerpc/powerpc/dump_machdep.c Thu Nov 7 21:02:57 2013 (r257813)
@@ -114,7 +114,7 @@ cb_dumpdata(struct pmap_md *md, int seqn
{
struct dumperinfo *di = (struct dumperinfo*)arg;
vm_offset_t va;
- size_t counter, ofs, resid, sz;
+ size_t counter, ofs, resid, sz, maxsz;
int c, error, twiddle;
error = 0;
@@ -123,11 +123,12 @@ cb_dumpdata(struct pmap_md *md, int seqn
ofs = 0; /* Logical offset within the chunk */
resid = md->md_size;
+ maxsz = min(DFLTPHYS, di->maxiosize);
printf(" chunk %d: %lu bytes ", seqnr, (u_long)resid);
while (resid) {
- sz = (resid > DFLTPHYS) ? DFLTPHYS : resid;
+ sz = min(resid, maxsz);
va = pmap_dumpsys_map(md, ofs, &sz);
counter += sz;
if (counter >> 24) {
More information about the svn-src-all
mailing list