diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-09-10 16:34:10 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2010-09-10 16:34:10 +0000 |
commit | 924988b6ec2a9e6a026b5489028ad504451931ac (patch) | |
tree | 1b3c600d98211e262609942c2f20c60816cd46ec /sys/ufs/ext2fs | |
parent | dc82911ae9236515748693d3963bcf4c56827fcb (diff) |
Backout the VOP diff until the issues naddy was seeing on alpha (gcc3)
have been resolved.
Diffstat (limited to 'sys/ufs/ext2fs')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_extern.h | 12 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_subr.c | 8 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vfsops.c | 21 | ||||
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vnops.c | 197 |
4 files changed, 109 insertions, 129 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_extern.h b/sys/ufs/ext2fs/ext2fs_extern.h index 27c5db868a4..0a7cedfd75a 100644 --- a/sys/ufs/ext2fs/ext2fs_extern.h +++ b/sys/ufs/ext2fs/ext2fs_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_extern.h,v 1.27 2010/09/06 23:44:10 thib Exp $ */ +/* $OpenBSD: ext2fs_extern.h,v 1.28 2010/09/10 16:34:09 thib Exp $ */ /* $NetBSD: ext2fs_extern.h,v 1.1 1997/06/11 09:33:55 bouyer Exp $ */ /*- @@ -97,7 +97,7 @@ int ext2fs_checkpath(struct inode *, struct inode *, struct ucred *); /* ext2fs_subr.c */ int ext2fs_bufatoff(struct inode *, off_t, char **, struct buf **); -int ext2fs_vinit(struct mount *, struct vops *, struct vops *, +int ext2fs_vinit(struct mount *, int (**)(void *), int (**)(void *), struct vnode **); void ext2fs_fragacct(struct m_ext2fs *, int, int32_t[], int); #ifdef DIAGNOSTIC @@ -151,11 +151,11 @@ __END_DECLS #define IS_EXT2_VNODE(vp) (vp->v_tag == VT_EXT2FS) -extern struct vops ext2fs_vops; -extern struct vops ext2fs_specvops; +extern int (**ext2fs_vnodeop_p)(void *); +extern int (**ext2fs_specop_p)(void *); #ifdef FIFO -extern struct vops ext2fs_fifovops; -#define EXT2FS_FIFOOPS &ext2fs_fifovops +extern int (**ext2fs_fifoop_p)(void *); +#define EXT2FS_FIFOOPS ext2fs_fifoop_p #else #define EXT2FS_FIFOOPS NULL #endif diff --git a/sys/ufs/ext2fs/ext2fs_subr.c b/sys/ufs/ext2fs/ext2fs_subr.c index 3508d7a6962..73ee5f8d6ff 100644 --- a/sys/ufs/ext2fs/ext2fs_subr.c +++ b/sys/ufs/ext2fs/ext2fs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_subr.c,v 1.21 2010/09/06 23:44:10 thib Exp $ */ +/* $OpenBSD: ext2fs_subr.c,v 1.22 2010/09/10 16:34:09 thib Exp $ */ /* $NetBSD: ext2fs_subr.c,v 1.1 1997/06/11 09:34:03 bouyer Exp $ */ /* @@ -136,8 +136,8 @@ ext2fs_checkoverlap(struct buf *bp, struct inode *ip) * Initialize the vnode associated with a new inode, handle aliased vnodes. */ int -ext2fs_vinit(struct mount *mp, struct vops *specops, - struct vops *fifoops, struct vnode **vpp) +ext2fs_vinit(struct mount *mp, int (**specops)(void *), + int (**fifoops)(void *), struct vnode **vpp) { struct inode *ip; struct vnode *vp, *nvp; @@ -161,7 +161,7 @@ ext2fs_vinit(struct mount *mp, struct vops *specops, */ nvp->v_data = vp->v_data; vp->v_data = NULL; - vp->v_op = &spec_vops; + vp->v_op = spec_vnodeop_p; #ifdef VFSDEBUG vp->v_flag &= ~VLOCKSWORK; #endif diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c index 939a03d81e2..cf74eff30ee 100644 --- a/sys/ufs/ext2fs/ext2fs_vfsops.c +++ b/sys/ufs/ext2fs/ext2fs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vfsops.c,v 1.56 2010/09/06 23:44:10 thib Exp $ */ +/* $OpenBSD: ext2fs_vfsops.c,v 1.57 2010/09/10 16:34:09 thib Exp $ */ /* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */ /* @@ -70,6 +70,21 @@ extern struct lock ufs_hashlock; int ext2fs_sbupdate(struct ufsmount *, int); static int ext2fs_checksb(struct ext2fs *, int); +extern struct vnodeopv_desc ext2fs_vnodeop_opv_desc; +extern struct vnodeopv_desc ext2fs_specop_opv_desc; +#ifdef FIFO +extern struct vnodeopv_desc ext2fs_fifoop_opv_desc; +#endif + +struct vnodeopv_desc *ext2fs_vnodeopv_descs[] = { + &ext2fs_vnodeop_opv_desc, + &ext2fs_specop_opv_desc, +#ifdef FIFO + &ext2fs_fifoop_opv_desc, +#endif + NULL, +}; + const struct vfsops ext2fs_vfsops = { ext2fs_mount, ufs_start, @@ -811,7 +826,7 @@ ext2fs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) return (0); /* Allocate a new vnode/inode. */ - if ((error = getnewvnode(VT_EXT2FS, mp, &ext2fs_vops, &vp)) != 0) { + if ((error = getnewvnode(VT_EXT2FS, mp, ext2fs_vnodeop_p, &vp)) != 0) { *vpp = NULL; return (error); } @@ -890,7 +905,7 @@ ext2fs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) * Initialize the vnode from the inode, check for aliases. * Note that the underlying vnode may have changed. */ - error = ext2fs_vinit(mp, &ext2fs_specvops, EXT2FS_FIFOOPS, &vp); + error = ext2fs_vinit(mp, ext2fs_specop_p, EXT2FS_FIFOOPS, &vp); if (error) { vput(vp); *vpp = NULL; diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index 0bc63b51edd..4b7626d09be 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.55 2010/09/09 10:37:04 thib Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.56 2010/09/10 16:34:09 thib Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -1255,126 +1255,91 @@ ext2fs_reclaim(void *v) } /* Global vfs data structures for ext2fs. */ -struct vops ext2fs_vops = { - .vop_default = eopnotsupp, - .vop_lookup = ext2fs_lookup, - .vop_create = ext2fs_create, - .vop_mknod = ext2fs_mknod, - .vop_open = ext2fs_open, - .vop_close = ufs_close, - .vop_access = ext2fs_access, - .vop_getattr = ext2fs_getattr, - .vop_setattr = ext2fs_setattr, - .vop_read = ext2fs_read, - .vop_write = ext2fs_write, - .vop_ioctl = ufs_ioctl, - .vop_poll = ufs_poll, - .vop_kqfilter = vop_generic_kqfilter, - .vop_fsync = ext2fs_fsync, - .vop_remove = ext2fs_remove, - .vop_link = ext2fs_link, - .vop_rename = ext2fs_rename, - .vop_mkdir = ext2fs_mkdir, - .vop_rmdir = ext2fs_rmdir, - .vop_symlink = ext2fs_symlink, - .vop_readdir = ext2fs_readdir, - .vop_readlink = ext2fs_readlink, - .vop_abortop = vop_generic_abortop, - .vop_inactive = ext2fs_inactive, - .vop_reclaim = ext2fs_reclaim, - .vop_lock = ufs_lock, - .vop_unlock = ufs_unlock, - .vop_bmap = ext2fs_bmap, - .vop_strategy = ufs_strategy, - .vop_print = ufs_print, - .vop_islocked = ufs_islocked, - .vop_pathconf = ufs_pathconf, - .vop_advlock = ext2fs_advlock, - .vop_bwrite = vop_generic_bwrite +int (**ext2fs_vnodeop_p)(void *); +struct vnodeopv_entry_desc ext2fs_vnodeop_entries[] = { + { &vop_default_desc, eopnotsupp }, + { &vop_lookup_desc, ext2fs_lookup }, + { &vop_create_desc, ext2fs_create }, + { &vop_mknod_desc, ext2fs_mknod }, + { &vop_open_desc, ext2fs_open }, + { &vop_close_desc, ufs_close }, + { &vop_access_desc, ext2fs_access }, + { &vop_getattr_desc, ext2fs_getattr }, + { &vop_setattr_desc, ext2fs_setattr }, + { &vop_read_desc, ext2fs_read }, + { &vop_write_desc, ext2fs_write }, + { &vop_ioctl_desc, ufs_ioctl }, + { &vop_poll_desc, ufs_poll }, + { &vop_kqfilter_desc, vop_generic_kqfilter }, + { &vop_fsync_desc, ext2fs_fsync }, + { &vop_remove_desc, ext2fs_remove }, + { &vop_link_desc, ext2fs_link }, + { &vop_rename_desc, ext2fs_rename }, + { &vop_mkdir_desc, ext2fs_mkdir }, + { &vop_rmdir_desc, ext2fs_rmdir }, + { &vop_symlink_desc, ext2fs_symlink }, + { &vop_readdir_desc, ext2fs_readdir }, + { &vop_readlink_desc, ext2fs_readlink }, + { &vop_abortop_desc, vop_generic_abortop }, + { &vop_inactive_desc, ext2fs_inactive }, + { &vop_reclaim_desc, ext2fs_reclaim }, + { &vop_lock_desc, ufs_lock }, + { &vop_unlock_desc, ufs_unlock }, + { &vop_bmap_desc, ext2fs_bmap }, + { &vop_strategy_desc, ufs_strategy }, + { &vop_print_desc, ufs_print }, + { &vop_islocked_desc, ufs_islocked }, + { &vop_pathconf_desc, ufs_pathconf }, + { &vop_advlock_desc, ext2fs_advlock }, + { &vop_bwrite_desc, vop_generic_bwrite }, + { NULL, NULL } }; - -struct vops ext2fs_specvops = { - .vop_default = eopnotsupp, - .vop_close = ufsspec_close, - .vop_access = ext2fs_access, - .vop_getattr = ext2fs_getattr, - .vop_setattr = ext2fs_setattr, - .vop_read = ufsspec_read, - .vop_write = ufsspec_write, - .vop_fsync = ext2fs_fsync, - .vop_inactive = ext2fs_inactive, - .vop_reclaim = ext2fs_reclaim, - .vop_lock = ufs_lock, - .vop_unlock = ufs_unlock, - .vop_print = ufs_print, - .vop_islocked = ufs_islocked, - - /* XXX: Keep in sync with spec_vops. */ - .vop_lookup = vop_generic_lookup, - .vop_create = spec_badop, - .vop_mknod = spec_badop, - .vop_open = spec_open, - .vop_ioctl = spec_ioctl, - .vop_poll = spec_poll, - .vop_kqfilter = spec_kqfilter, - .vop_revoke = vop_generic_revoke, - .vop_remove = spec_badop, - .vop_link = spec_badop, - .vop_rename = spec_badop, - .vop_mkdir = spec_badop, - .vop_rmdir = spec_badop, - .vop_symlink = spec_badop, - .vop_readdir = spec_badop, - .vop_readlink = spec_badop, - .vop_abortop = spec_badop, - .vop_bmap = vop_generic_bmap, - .vop_strategy = spec_strategy, - .vop_pathconf = spec_pathconf, - .vop_advlock = spec_advlock, - .vop_bwrite = vop_generic_bwrite, +struct vnodeopv_desc ext2fs_vnodeop_opv_desc = + { &ext2fs_vnodeop_p, ext2fs_vnodeop_entries }; + +int (**ext2fs_specop_p)(void *); +struct vnodeopv_entry_desc ext2fs_specop_entries[] = { + { &vop_default_desc, spec_vnoperate }, + { &vop_close_desc, ufsspec_close }, + { &vop_access_desc, ext2fs_access }, + { &vop_getattr_desc, ext2fs_getattr }, + { &vop_setattr_desc, ext2fs_setattr }, + { &vop_read_desc, ufsspec_read }, + { &vop_write_desc, ufsspec_write }, + { &vop_fsync_desc, ext2fs_fsync }, + { &vop_inactive_desc, ext2fs_inactive }, + { &vop_reclaim_desc, ext2fs_reclaim }, + { &vop_lock_desc, ufs_lock }, + { &vop_unlock_desc, ufs_unlock }, + { &vop_print_desc, ufs_print }, + { &vop_islocked_desc, ufs_islocked }, + { NULL, NULL } }; +struct vnodeopv_desc ext2fs_specop_opv_desc = + { &ext2fs_specop_p, ext2fs_specop_entries }; #ifdef FIFO -struct vops ext2fs_fifovops = { - .vop_default = eopnotsupp, - .vop_close = ufsfifo_close, - .vop_access = ufsfifo_close, - .vop_getattr = ext2fs_getattr, - .vop_setattr = ext2fs_setattr, - .vop_read = ufsfifo_read, - .vop_write = ufsfifo_write, - .vop_fsync = ext2fs_fsync, - .vop_inactive = ext2fs_inactive, - .vop_reclaim = ext2fsfifo_reclaim, - .vop_lock = ufs_lock, - .vop_unlock = ufs_unlock, - .vop_print = ufs_print, - .vop_islocked = ufs_islocked, - .vop_bwrite = vop_generic_bwrite, - - /* XXX: Keep in sync with fifo_vops */ - .vop_lookup = vop_generic_lookup, - .vop_create = fifo_badop, - .vop_mknod = fifo_badop, - .vop_open = fifo_open, - .vop_ioctl = fifo_ioctl, - .vop_poll = fifo_poll, - .vop_kqfilter = fifo_kqfilter, - .vop_revoke = vop_generic_revoke, - .vop_remove = fifo_badop, - .vop_link = fifo_badop, - .vop_rename = fifo_badop, - .vop_mkdir = fifo_badop, - .vop_rmdir = fifo_badop, - .vop_symlink = fifo_badop, - .vop_readdir = fifo_badop, - .vop_readlink = fifo_badop, - .vop_abortop = fifo_badop, - .vop_bmap = vop_generic_bmap, - .vop_strategy = fifo_badop, - .vop_pathconf = fifo_pathconf, - .vop_advlock = fifo_advlock, +int (**ext2fs_fifoop_p)(void *); +struct vnodeopv_entry_desc ext2fs_fifoop_entries[] = { + { &vop_default_desc, fifo_vnoperate }, + { &vop_close_desc, ufsfifo_close }, + { &vop_access_desc, ext2fs_access }, + { &vop_getattr_desc, ext2fs_getattr }, + { &vop_setattr_desc, ext2fs_setattr }, + { &vop_read_desc, ufsfifo_read }, + { &vop_write_desc, ufsfifo_write }, + { &vop_fsync_desc, ext2fs_fsync }, + { &vop_inactive_desc, ext2fs_inactive }, + { &vop_reclaim_desc, ext2fsfifo_reclaim }, + { &vop_lock_desc, ufs_lock }, + { &vop_unlock_desc, ufs_unlock }, + { &vop_print_desc, ufs_print }, + { &vop_islocked_desc, ufs_islocked }, + { &vop_bwrite_desc, vop_generic_bwrite }, + { NULL, NULL } }; +struct vnodeopv_desc ext2fs_fifoop_opv_desc = + { &ext2fs_fifoop_p, ext2fs_fifoop_entries }; int ext2fsfifo_reclaim(void *v) |