Subject: CVS commit: syssrc/sys/kern
To: None <source-changes@netbsd.org>
From: Chuck Silvers <chs@netbsd.org>
List: source-changes
Date: 03/17/2002 01:49:59
Module Name:	syssrc
Committed By:	chs
Date:		Sat Mar 16 23:49:59 UTC 2002

Modified Files:
	syssrc/sys/kern: vfs_bio.c

Log Message:
fix bread() to return errors from reading past the end of the device.
back in rev. 1.51, bread() and breadn() were changed to assume that
if B_DONE is set on a buffer returned by bio_doread(), that the buffer
must have already been in the cache, and thus the overall bread() should
return success.  but if the requested buffer is not in the cache and
is past the end of the device, bounds_check_with_label() will set B_ERROR
on the buffer and the caller will call biodone(), which will cause bread()
to think the buffer was already in the cache and thus return success.
to fix this, undo rev. 1.51 and instead have biowait() treat both B_DONE
and B_DELWRI as indicators that it doesn't need to sleep waiting for an
i/o to complete.


To generate a diff of this commit:
cvs rdiff -r1.79 -r1.80 syssrc/sys/kern/vfs_bio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.