Date: Thu, 7 Nov 2013 21:02:57 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257813 - head/sys/powerpc/powerpc Message-ID: <201311072102.rA7L2vqw056277@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311072102.rA7L2vqw056277>