From e136eac2242d99b89cd683317975fe5855e2dded Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Fri, 27 Dec 2013 17:04:51 +0000 Subject: [PATCH] Revert r259200. There are geoms/drivers which do not update bio_completed, only manage bio_resid, e.g. sa(4). Reported and tested by: Manfred Antar Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_bio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index b7c4d6005778..e72f5e44bf52 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3678,7 +3678,7 @@ bufdonebio(struct bio *bip) struct buf *bp; bp = bip->bio_caller2; - bp->b_resid = bp->b_bcount - bip->bio_completed; + bp->b_resid = bip->bio_resid; bp->b_ioflags = bip->bio_flags; bp->b_error = bip->bio_error; if (bp->b_error)