aboutsummaryrefslogtreecommitdiff
path: root/sys/miscfs
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2001-04-29 11:48:41 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2001-04-29 11:48:41 +0000
commitb7ebffbc08b318c8896df13149761f167ecbf531 (patch)
tree07f662b87b96771b95f882e8eb622337b85fd720 /sys/miscfs
parentbdb88555502079315ba946769674a913de9cca65 (diff)
Add a vop_stdbmap(), and make it part of the default vop vector.
Make 7 filesystems which don't really know about VOP_BMAP rely on the default vector, rather than more or less complete local vop_nopbmap() implementations.
Notes
Notes: svn path=/head/; revision=76131
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/fdesc/fdesc_vnops.c1
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c28
-rw-r--r--sys/miscfs/portal/portal_vnops.c1
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c31
-rw-r--r--sys/miscfs/specfs/spec_vnops.c1
-rw-r--r--sys/miscfs/union/union_vnops.c28
6 files changed, 1 insertions, 89 deletions
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c
index 2b29f1c60f03..5846ac78414f 100644
--- a/sys/miscfs/fdesc/fdesc_vnops.c
+++ b/sys/miscfs/fdesc/fdesc_vnops.c
@@ -557,7 +557,6 @@ fdesc_badop()
static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_access_desc, (vop_t *) vop_null },
- { &vop_bmap_desc, (vop_t *) fdesc_badop },
{ &vop_getattr_desc, (vop_t *) fdesc_getattr },
{ &vop_inactive_desc, (vop_t *) fdesc_inactive },
{ &vop_lookup_desc, (vop_t *) fdesc_lookup },
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index 79ee0aa7a3d9..3cd542555f93 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -72,7 +72,6 @@ static int fifo_write __P((struct vop_write_args *));
static int fifo_ioctl __P((struct vop_ioctl_args *));
static int fifo_poll __P((struct vop_poll_args *));
static int fifo_kqfilter __P((struct vop_kqfilter_args *));
-static int fifo_bmap __P((struct vop_bmap_args *));
static int fifo_pathconf __P((struct vop_pathconf_args *));
static int fifo_advlock __P((struct vop_advlock_args *));
@@ -91,7 +90,6 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_access_desc, (vop_t *) vop_ebadf },
{ &vop_advlock_desc, (vop_t *) fifo_advlock },
- { &vop_bmap_desc, (vop_t *) fifo_bmap },
{ &vop_close_desc, (vop_t *) fifo_close },
{ &vop_create_desc, (vop_t *) fifo_badop },
{ &vop_getattr_desc, (vop_t *) vop_ebadf },
@@ -463,32 +461,6 @@ fifo_poll(ap)
}
/*
- * This is a noop, simply returning what one has been given.
- */
-static int
-fifo_bmap(ap)
- struct vop_bmap_args /* {
- struct vnode *a_vp;
- daddr_t a_bn;
- struct vnode **a_vpp;
- daddr_t *a_bnp;
- int *a_runp;
- int *a_runb;
- } */ *ap;
-{
-
- if (ap->a_vpp != NULL)
- *ap->a_vpp = ap->a_vp;
- if (ap->a_bnp != NULL)
- *ap->a_bnp = ap->a_bn;
- if (ap->a_runp != NULL)
- *ap->a_runp = 0;
- if (ap->a_runb != NULL)
- *ap->a_runb = 0;
- return (0);
-}
-
-/*
* Device close routine
*/
/* ARGSUSED */
diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c
index 621059a1d478..b53c4cace80f 100644
--- a/sys/miscfs/portal/portal_vnops.c
+++ b/sys/miscfs/portal/portal_vnops.c
@@ -575,7 +575,6 @@ vop_t **portal_vnodeop_p;
static struct vnodeopv_entry_desc portal_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_access_desc, (vop_t *) vop_null },
- { &vop_bmap_desc, (vop_t *) portal_badop },
{ &vop_getattr_desc, (vop_t *) portal_getattr },
{ &vop_lookup_desc, (vop_t *) portal_lookup },
{ &vop_open_desc, (vop_t *) portal_open },
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index dc53c764da00..f7201fbdd78d 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -318,36 +318,6 @@ procfs_ioctl(ap)
}
/*
- * do block mapping for pfsnode (vp).
- * since we don't use the buffer cache
- * for procfs this function should never
- * be called. in any case, it's not clear
- * what part of the kernel ever makes use
- * of this function. for sanity, this is the
- * usual no-op bmap, although returning
- * (EIO) would be a reasonable alternative.
- */
-static int
-procfs_bmap(ap)
- struct vop_bmap_args /* {
- struct vnode *a_vp;
- daddr_t a_bn;
- struct vnode **a_vpp;
- daddr_t *a_bnp;
- int *a_runp;
- } */ *ap;
-{
-
- if (ap->a_vpp != NULL)
- *ap->a_vpp = ap->a_vp;
- if (ap->a_bnp != NULL)
- *ap->a_bnp = ap->a_bn;
- if (ap->a_runp != NULL)
- *ap->a_runp = 0;
- return (0);
-}
-
-/*
* _reclaim is called when getnewvnode()
* wants to make use of an entry on the vnode
* free list. at this time the filesystem needs
@@ -1019,7 +989,6 @@ static struct vnodeopv_entry_desc procfs_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_access_desc, (vop_t *) procfs_access },
{ &vop_advlock_desc, (vop_t *) procfs_badop },
- { &vop_bmap_desc, (vop_t *) procfs_bmap },
{ &vop_close_desc, (vop_t *) procfs_close },
{ &vop_create_desc, (vop_t *) procfs_badop },
{ &vop_getattr_desc, (vop_t *) procfs_getattr },
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index 2940f404b779..95922c83d490 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -73,7 +73,6 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_access_desc, (vop_t *) vop_ebadf },
{ &vop_advlock_desc, (vop_t *) spec_advlock },
- { &vop_bmap_desc, (vop_t *) spec_bmap },
{ &vop_close_desc, (vop_t *) spec_close },
{ &vop_create_desc, (vop_t *) vop_panic },
{ &vop_freeblks_desc, (vop_t *) spec_freeblks },
diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c
index 2ca72d74a2cb..9529da525760 100644
--- a/sys/miscfs/union/union_vnops.c
+++ b/sys/miscfs/union/union_vnops.c
@@ -69,7 +69,6 @@ SYSCTL_INT(_vfs, OID_AUTO, uniondebug, CTLFLAG_RD, &uniondebug, 0, "");
static int union_access __P((struct vop_access_args *ap));
static int union_advlock __P((struct vop_advlock_args *ap));
-static int union_bmap __P((struct vop_bmap_args *ap));
static int union_close __P((struct vop_close_args *ap));
static int union_create __P((struct vop_create_args *ap));
static int union_fsync __P((struct vop_fsync_args *ap));
@@ -1823,31 +1822,6 @@ union_unlock(ap)
return(error);
}
-/*
- * union_bmap:
- *
- * There isn't much we can do. We cannot push through to the real vnode
- * to get to the underlying device because this will bypass data
- * cached by the real vnode.
- *
- * For some reason we cannot return the 'real' vnode either, it seems
- * to blow up memory maps.
- */
-
-static int
-union_bmap(ap)
- struct vop_bmap_args /* {
- struct vnode *a_vp;
- daddr_t a_bn;
- struct vnode **a_vpp;
- daddr_t *a_bnp;
- int *a_runp;
- int *a_runb;
- } */ *ap;
-{
- return(EOPNOTSUPP);
-}
-
static int
union_print(ap)
struct vop_print_args /* {
@@ -1941,7 +1915,7 @@ static struct vnodeopv_entry_desc union_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_access_desc, (vop_t *) union_access },
{ &vop_advlock_desc, (vop_t *) union_advlock },
- { &vop_bmap_desc, (vop_t *) union_bmap },
+ { &vop_bmap_desc, (vop_t *) vop_eopnotsupp },
{ &vop_close_desc, (vop_t *) union_close },
{ &vop_create_desc, (vop_t *) union_create },
{ &vop_fsync_desc, (vop_t *) union_fsync },