Don't convert all lower-layer errors to EIO.
Don't convert all lower layer errors to EIO. Instead, pass the actual error up the stack. This will allow the upper layers that look for ENXIO to react properly to that signal from the lower layers and, for UFS, unmount the filesystem. Reviewed by: kib@ Differential Revision: https://reviews.freebsd.org/D23755
This commit is contained in:
parent
f53b49ad03
commit
b143dc96e5
@ -628,8 +628,11 @@ vnode_pager_input_smlfs(vm_object_t object, vm_page_t m)
|
||||
|
||||
bwait(bp, PVM, "vnsrd");
|
||||
|
||||
if ((bp->b_ioflags & BIO_ERROR) != 0)
|
||||
error = EIO;
|
||||
if ((bp->b_ioflags & BIO_ERROR) != 0) {
|
||||
KASSERT(bp->b_error != 0,
|
||||
("%s: buf error but b_error == 0\n", __func__));
|
||||
error = bp->b_error;
|
||||
}
|
||||
|
||||
/*
|
||||
* free the buffer header back to the swap buffer pool
|
||||
@ -1113,7 +1116,9 @@ vnode_pager_generic_getpages_done(struct buf *bp)
|
||||
off_t tfoff, nextoff;
|
||||
int i, error;
|
||||
|
||||
error = (bp->b_ioflags & BIO_ERROR) != 0 ? EIO : 0;
|
||||
KASSERT((bp->b_ioflags & BIO_ERROR) == 0 || bp->b_error != 0,
|
||||
("%s: buf error but b_error == 0\n", __func__));
|
||||
error = (bp->b_ioflags & BIO_ERROR) != 0 ? bp->b_error : 0;
|
||||
object = bp->b_vp->v_object;
|
||||
|
||||
if (error == 0 && bp->b_bcount != bp->b_npages * PAGE_SIZE) {
|
||||
|
Loading…
Reference in New Issue
Block a user