I have not had any reports of trouble for a long time, so remove the

gentle versions of the vop_strategy()/vop_specstrategy() mismatch methods
and use vop_panic() instead.
This commit is contained in:
phk 2003-06-15 19:49:14 +00:00
parent fc203320de
commit ad04f29757
2 changed files with 4 additions and 51 deletions

View File

@ -67,7 +67,6 @@ static int spec_open(struct vop_open_args *);
static int spec_poll(struct vop_poll_args *);
static int spec_print(struct vop_print_args *);
static int spec_read(struct vop_read_args *);
static int spec_strategy(struct vop_strategy_args *);
static int spec_specstrategy(struct vop_specstrategy_args *);
static int spec_write(struct vop_write_args *);
@ -103,7 +102,7 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_rmdir_desc, (vop_t *) vop_panic },
{ &vop_setattr_desc, (vop_t *) vop_ebadf },
{ &vop_specstrategy_desc, (vop_t *) spec_specstrategy },
{ &vop_strategy_desc, (vop_t *) spec_strategy },
{ &vop_strategy_desc, (vop_t *) vop_panic },
{ &vop_symlink_desc, (vop_t *) vop_panic },
{ &vop_write_desc, (vop_t *) spec_write },
{ NULL, NULL }
@ -515,30 +514,6 @@ spec_xstrategy(struct vnode *vp, struct buf *bp)
return (0);
}
/*
* Decoy strategy routine. We should always come in via the specstrategy
* method, but in case some code has botched it, we have a strategy as
* well. We will deal with the request anyway and first time around we
* print some debugging useful information.
*/
static int
spec_strategy(ap)
struct vop_strategy_args /* {
struct vnode *a_vp;
struct buf *a_bp;
} */ *ap;
{
static int once;
if (!once) {
vprint("VOP_STRATEGY on VCHR", ap->a_vp);
backtrace();
once++;
}
return spec_xstrategy(ap->a_vp, ap->a_bp);
}
static int
spec_specstrategy(ap)
struct vop_specstrategy_args /* {

View File

@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$");
static int vop_nolookup(struct vop_lookup_args *);
static int vop_nostrategy(struct vop_strategy_args *);
static int vop_nospecstrategy(struct vop_specstrategy_args *);
/*
* This vnode table stores what we want to do if the filesystem doesn't
@ -98,7 +97,7 @@ static struct vnodeopv_entry_desc default_vnodeop_entries[] = {
{ &vop_putpages_desc, (vop_t *) vop_stdputpages },
{ &vop_readlink_desc, (vop_t *) vop_einval },
{ &vop_revoke_desc, (vop_t *) vop_revoke },
{ &vop_specstrategy_desc, (vop_t *) vop_nospecstrategy },
{ &vop_specstrategy_desc, (vop_t *) vop_panic },
{ &vop_strategy_desc, (vop_t *) vop_nostrategy },
{ &vop_unlock_desc, (vop_t *) vop_stdunlock },
{ NULL, NULL }
@ -212,6 +211,8 @@ vop_nolookup(ap)
static int
vop_nostrategy (struct vop_strategy_args *ap)
{
KASSERT(ap->a_vp == ap->a_bp->b_vp, ("%s(%p != %p)",
__func__, ap->a_vp, ap->a_bp->b_vp));
printf("No strategy for buffer at %p\n", ap->a_bp);
vprint("vnode", ap->a_vp);
vprint("device vnode", ap->a_bp->b_vp);
@ -221,29 +222,6 @@ vop_nostrategy (struct vop_strategy_args *ap)
return (EOPNOTSUPP);
}
/*
* vop_nospecstrategy:
*
* This shouldn't happen. VOP_SPECSTRATEGY should always have a VCHR
* argument vnode, and thos have a method for specstrategy over in
* specfs, so we only ever get here if somebody botched it.
* Pass the call to VOP_STRATEGY() and get on with life.
* The first time we print some info useful for debugging.
*/
static int
vop_nospecstrategy (struct vop_specstrategy_args *ap)
{
static int once;
if (!once) {
vprint("VOP_SPECSTRATEGY on non-VCHR", ap->a_vp);
backtrace();
once++;
}
return VOP_STRATEGY(ap->a_vp, ap->a_bp);
}
/*
* vop_stdpathconf:
*