git: 795a009b325c - main - md: Set bio_completed properly in the face of errors
Mark Johnston
markj at FreeBSD.org
Sun Dec 27 22:01:55 UTC 2020
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=795a009b325c93a0f48a83a68b5278160ac6d38e
commit 795a009b325c93a0f48a83a68b5278160ac6d38e
Author: Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2020-12-27 21:49:35 +0000
Commit: Mark Johnston <markj at FreeBSD.org>
CommitDate: 2020-12-27 21:49:35 +0000
md: Set bio_completed properly in the face of errors
Account for any residual bytes. This is only relevant for vnode-backed
md(4) devices.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27738
---
sys/dev/md/md.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 1778eda48f35..1b4b583b3c09 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -1244,7 +1244,7 @@ md_kthread(void *arg)
bp->bio_bcount = bp->bio_length;
devstat_end_transaction_bio(sc->devstat, bp);
}
- bp->bio_completed = bp->bio_length;
+ bp->bio_completed = bp->bio_length - bp->bio_resid;
g_io_deliver(bp, error);
}
}
More information about the dev-commits-src-main
mailing list