diff options
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r-- | sys/kern/vfs_default.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 85b8af9..f629b19 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -66,6 +66,7 @@ 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,6 +99,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_strategy_desc, (vop_t *) vop_nostrategy }, { &vop_unlock_desc, (vop_t *) vop_stdunlock }, { NULL, NULL } @@ -221,6 +223,29 @@ vop_nostrategy (struct vop_strategy_args *ap) } /* + * 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("\nVOP_SPECSTRATEGY on non-VCHR\n", ap->a_vp); + backtrace(); + once++; + } + return VOP_STRATEGY(ap->a_vp, ap->a_bp); +} + +/* * vop_stdpathconf: * * Standard implementation of POSIX pathconf, to get information about limits |