Subject: I/O error check in sw_reg_iodone()
To: None <tech-kern@netbsd.org>
From: Stephan Uphoff <ups@stups.com>
List: tech-kern
Date: 10/02/2002 15:26:11
The error detection for failed buffer I/O in function sw_reg_iodone() 
file uvm_swap.c is inconsistent with the rest of the kernel.

I recommend changing:

	if (vbp->vb_buf.b_error) {
		UVMHIST_LOG(pdhist, "  got error=%d !",
		    vbp->vb_buf.b_error, 0, 0, 0);

		/* pass error upward */
		vnx->vx_error = vbp->vb_buf.b_error;
	}

to:
	
	if (vbp->vb_buf.b_flags & B_ERROR ) {
		int error;
		error = ( vbp->vb_buf.b_error ) ? vbp->vb_buf.b_error : EIO;

		UVMHIST_LOG(pdhist, "  got error=%d !",
		    error, 0, 0, 0);

		/* pass error upward */
		vnx->vx_error = error;
	}


Stephan