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
This commit is contained in:
parent
e458944cf9
commit
795a009b32
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user