Date: Thu, 12 Dec 2013 08:23:28 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259247 - head/sys/geom Message-ID: <201312120823.rBC8NSfk005667@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu Dec 12 08:23:28 2013 New Revision: 259247 URL: http://svnweb.freebsd.org/changeset/base/259247 Log: Fix bug introduced at r256607. We have to recalculate bp_resid here since sizes of original and completed requests may differ due to end of media. Bisected by: pho Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Thu Dec 12 05:49:27 2013 (r259246) +++ head/sys/geom/geom_dev.c Thu Dec 12 08:23:28 2013 (r259247) @@ -487,7 +487,7 @@ g_dev_done(struct bio *bp2) bp = bp2->bio_parent; bp->bio_error = bp2->bio_error; bp->bio_completed = bp2->bio_completed; - bp->bio_resid = bp2->bio_resid; + bp->bio_resid = bp->bio_length - bp2->bio_completed; if (bp2->bio_error != 0) { g_trace(G_T_BIO, "g_dev_done(%p) had error %d", bp2, bp2->bio_error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312120823.rBC8NSfk005667>