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:
Matthew Dillon 1999-09-23 08:41:48 +00:00
parent 6f83979d1f
commit 25d1a00bc0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51600
2 changed files with 20 additions and 2 deletions

View File

@ -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);
/*

View File

@ -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);
/*