diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-10 04:45:33 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-12-10 04:45:33 +0000 |
commit | 1eef7286fcf85dd357190316b332838378170946 (patch) | |
tree | 5d07152a5670a8b50e09c86d0ca76970e76c6fc0 /sys/isofs/cd9660 | |
parent | c7c6e636a8bfbf2c68e2ed3e6d20fa1c5237bfb0 (diff) |
Big cleanup inspired by NetBSD with some parts of the code from NetBSD.
- get rid of VOP_BALLOCN and VOP_SIZE
- move the generic getpages and putpages into miscfs/genfs
- create a genfs_node which must be added to the top of the private portion
of each vnode for filsystems that want to use genfs_{get,put}pages
- rename genfs_mmap to vop_generic_mmap
Diffstat (limited to 'sys/isofs/cd9660')
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.h | 4 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 9 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 3 |
3 files changed, 11 insertions, 5 deletions
diff --git a/sys/isofs/cd9660/cd9660_node.h b/sys/isofs/cd9660/cd9660_node.h index d319e0bf8a1..15d02647f3a 100644 --- a/sys/isofs/cd9660/cd9660_node.h +++ b/sys/isofs/cd9660/cd9660_node.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_node.h,v 1.10 2001/06/23 02:14:22 csapuntz Exp $ */ +/* $OpenBSD: cd9660_node.h,v 1.11 2001/12/10 04:45:31 art Exp $ */ /* $NetBSD: cd9660_node.h,v 1.15 1997/04/11 21:52:01 kleink Exp $ */ /*- @@ -42,6 +42,7 @@ */ #include <sys/buf.h> +#include <miscfs/genfs/genfs.h> /* * Theoretically, directories can be more than 2Gb in length, @@ -76,6 +77,7 @@ struct iso_dnode { #endif struct iso_node { + struct genfs_node i_gnode; struct iso_node *i_next, **i_prev; /* hash chain */ struct vnode *i_vnode; /* vnode associated with this inode */ struct vnode *i_devvp; /* vnode for block I/O */ diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index b2b1455e6eb..75eb9be50a5 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vfsops.c,v 1.25 2001/11/27 05:27:11 art Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.26 2001/12/10 04:45:31 art Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -80,6 +80,10 @@ struct vfsops cd9660_vfsops = { cd9660_check_export }; +struct genfs_ops cd9660_genfsops = { + genfs_size, +}; + /* * Called by vfs_mountroot when iso is going to be mounted as root. */ @@ -939,7 +943,8 @@ retry: /* * XXX need generation number? */ - + + genfs_node_init(vp, &cd9660_genfsops); *vpp = vp; return (0); } diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 28e6dfaecef..d137c5bd85f 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.17 2001/12/10 02:19:34 art Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.18 2001/12/10 04:45:31 art Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -1068,7 +1068,6 @@ struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = { { &vop_advlock_desc, cd9660_advlock }, /* advlock */ { &vop_bwrite_desc, vop_generic_bwrite }, { &vop_getpages_desc, genfs_getpages }, - { &vop_size_desc, genfs_size }, { &vop_mmap_desc, cd9660_mmap }, { NULL, NULL } }; |