diff options
| author | reinoud <reinoud@NetBSD.org> | 2010-12-22 14:05:50 +0000 |
|---|---|---|
| committer | reinoud <reinoud@NetBSD.org> | 2010-12-22 14:05:50 +0000 |
| commit | 0819ccbf0d83e98c57f753ce1e4a79540c0c7991 (patch) | |
| tree | 1e10a4f8d1165c259e7cd9f8e1634b3f26ad02f7 /sys/dev/dm/dm_pdev.c | |
| parent | be222fea33bd5be12645c7d4725184f338abefa4 (diff) | |
Fix nestio's behavior on error.
The mbp->b_resid is used to track if all the nested buffers have been issued
and reported back. When the last buffer calls in, mbp->b_resid becomes zero
and biodone(mbp) is called. This is fine as long as there are no errors.
If a read-error does occure in one of the nested buffers, the mbp->b_error is
set and on its call to biodone(mbp), with mbp->b_resid is zero, physio()
panics since it asserts that IF an error is set on a buffer, there should be a
residual amount of data left to transfered.
The patch fixes this case by setting mbp->b_resid back to mbp->b_bcount on
mbp->b_error just before biodone(mbp).
This behaviour is consistent with normal buffer issueing. It either succeeds
or doesn't succeed.
Diffstat (limited to 'sys/dev/dm/dm_pdev.c')
0 files changed, 0 insertions, 0 deletions
