Fix ccdiodone code. The code was using cbp->cb_buf.b_bcount to
sum the total amount of I/O issued to determine when all the I/O has completed. This fails when the EOF boundry occurs in the middle of an I/O. Using cbp->cb_buf.b_bufsize works better.
This commit is contained in:
parent
6f83979d1f
commit
25d1a00bc0
@ -1007,7 +1007,16 @@ ccdiodone(cbp)
|
||||
return;
|
||||
}
|
||||
|
||||
count = cbp->cb_buf.b_bcount;
|
||||
/*
|
||||
* use b_bufsize to determine how big the original request was rather
|
||||
* then b_bcount, because b_bcount may have been truncated for EOF.
|
||||
*
|
||||
* XXX We check for an error, but we do not test the resid for an
|
||||
* aligned EOF condition. This may result in character & block
|
||||
* device access not recognizing EOF properly when read or written
|
||||
* sequentially, but will not effect filesystems.
|
||||
*/
|
||||
count = cbp->cb_buf.b_bufsize;
|
||||
putccdbuf(cbp);
|
||||
|
||||
/*
|
||||
|
@ -1007,7 +1007,16 @@ ccdiodone(cbp)
|
||||
return;
|
||||
}
|
||||
|
||||
count = cbp->cb_buf.b_bcount;
|
||||
/*
|
||||
* use b_bufsize to determine how big the original request was rather
|
||||
* then b_bcount, because b_bcount may have been truncated for EOF.
|
||||
*
|
||||
* XXX We check for an error, but we do not test the resid for an
|
||||
* aligned EOF condition. This may result in character & block
|
||||
* device access not recognizing EOF properly when read or written
|
||||
* sequentially, but will not effect filesystems.
|
||||
*/
|
||||
count = cbp->cb_buf.b_bufsize;
|
||||
putccdbuf(cbp);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user