genfs_getpages:
- add an assertion. - call VOP_STRATEGY of underlying vnode directly, rather than through the filesystem vnode. - no need to set b_dev here because VOP_STRATEGY will take care of it.
This commit is contained in:
parent
c23511b386
commit
89bc307830
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: genfs_vnops.c,v 1.108 2005/11/02 12:38:59 yamt Exp $ */
|
||||
/* $NetBSD: genfs_vnops.c,v 1.109 2005/11/12 22:29:53 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.108 2005/11/02 12:38:59 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.109 2005/11/12 22:29:53 yamt Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_nfsserver.h"
|
||||
@ -468,6 +468,8 @@ genfs_getpages(void *v)
|
||||
UVMHIST_LOG(ubchist, "vp %p off 0x%x/%x count %d",
|
||||
vp, ap->a_offset >> 32, ap->a_offset, *ap->a_count);
|
||||
|
||||
KASSERT(vp->v_type == VREG || vp->v_type == VBLK);
|
||||
|
||||
/* XXXUBC temp limit */
|
||||
if (*ap->a_count > MAX_READ_AHEAD) {
|
||||
panic("genfs_getpages: too many pages");
|
||||
@ -817,9 +819,6 @@ genfs_getpages(void *v)
|
||||
}
|
||||
bp->b_lblkno = 0;
|
||||
bp->b_private = mbp;
|
||||
if (devvp->v_type == VBLK) {
|
||||
bp->b_dev = devvp->v_rdev;
|
||||
}
|
||||
|
||||
/* adjust physical blkno for partial blocks */
|
||||
bp->b_blkno = blkno + ((offset - ((off_t)lbn << fs_bshift)) >>
|
||||
@ -833,7 +832,8 @@ genfs_getpages(void *v)
|
||||
BIO_SETPRIO(bp, BPRIO_TIMELIMITED);
|
||||
else
|
||||
BIO_SETPRIO(bp, BPRIO_TIMECRITICAL);
|
||||
VOP_STRATEGY(bp->b_vp, bp);
|
||||
|
||||
VOP_STRATEGY(devvp, bp);
|
||||
}
|
||||
|
||||
loopdone:
|
||||
|
Loading…
Reference in New Issue
Block a user