Module Name: src Committed By: pooka Date: Wed Oct 7 09:50:43 UTC 2009
Modified Files: src/sys/rump/include/rump: rump.h src/sys/rump/librump/rumpvfs: rump_vfs.c Log Message: g/c some prehistoric interfaces which have been superceded by others. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/rump/include/rump/rump.h cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpvfs/rump_vfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/include/rump/rump.h diff -u src/sys/rump/include/rump/rump.h:1.26 src/sys/rump/include/rump/rump.h:1.27 --- src/sys/rump/include/rump/rump.h:1.26 Wed Oct 7 09:17:54 2009 +++ src/sys/rump/include/rump/rump.h Wed Oct 7 09:50:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.h,v 1.26 2009/10/07 09:17:54 pooka Exp $ */ +/* $NetBSD: rump.h,v 1.27 2009/10/07 09:50:43 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -78,10 +78,6 @@ int rump__init(int); int rump_getversion(void); -struct mount *rump_mnt_init(struct vfsops *, int); -int rump_mnt_mount(struct mount *, const char *, void *, size_t *); -void rump_mnt_destroy(struct mount *); - struct componentname *rump_makecn(u_long, u_long, const char *, size_t, kauth_cred_t, struct lwp *); void rump_freecn(struct componentname *, int); @@ -112,8 +108,6 @@ void rump_vp_incref(struct vnode *); int rump_vp_getref(struct vnode *); -void rump_vp_decref(struct vnode *); -void rump_vp_recycle_nokidding(struct vnode *); void rump_vp_rele(struct vnode *); enum rump_uiorw { RUMPUIO_READ, RUMPUIO_WRITE }; @@ -122,7 +116,7 @@ off_t rump_uio_getoff(struct uio *); size_t rump_uio_free(struct uio *); -void rump_vp_interlock(struct vnode *); +void rump_vp_interlock(struct vnode *); kauth_cred_t rump_cred_create(uid_t, gid_t, size_t, gid_t *); kauth_cred_t rump_cred_suserget(void); Index: src/sys/rump/librump/rumpvfs/rump_vfs.c diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.27 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.28 --- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.27 Tue Oct 6 16:23:03 2009 +++ src/sys/rump/librump/rumpvfs/rump_vfs.c Wed Oct 7 09:50:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_vfs.c,v 1.27 2009/10/06 16:23:03 pooka Exp $ */ +/* $NetBSD: rump_vfs.c,v 1.28 2009/10/07 09:50:43 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.27 2009/10/06 16:23:03 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.28 2009/10/07 09:50:43 pooka Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -120,69 +120,6 @@ } } -struct mount * -rump_mnt_init(struct vfsops *vfsops, int mntflags) -{ - struct mount *mp; - - mp = kmem_zalloc(sizeof(struct mount), KM_SLEEP); - - mp->mnt_op = vfsops; - mp->mnt_flag = mntflags; - TAILQ_INIT(&mp->mnt_vnodelist); - rw_init(&mp->mnt_unmounting); - mutex_init(&mp->mnt_updating, MUTEX_DEFAULT, IPL_NONE); - mutex_init(&mp->mnt_renamelock, MUTEX_DEFAULT, IPL_NONE); - mp->mnt_refcnt = 1; - mp->mnt_vnodecovered = rootvnode; - - mount_initspecific(mp); - - return mp; -} - -int -rump_mnt_mount(struct mount *mp, const char *path, void *data, size_t *dlen) -{ - struct vnode *rvp; - int rv; - - rv = VFS_MOUNT(mp, path, data, dlen); - if (rv) - return rv; - - (void) VFS_STATVFS(mp, &mp->mnt_stat); - rv = VFS_START(mp, 0); - if (rv) { - VFS_UNMOUNT(mp, MNT_FORCE); - return rv; - } - - /* - * XXX: set a root for lwp0. This is strictly not correct, - * but makes things work for single fs case without having - * to manually call rump_rcvp_set(). - */ - VFS_ROOT(mp, &rvp); - rump_rcvp_lwpset(rvp, rvp, &lwp0); - vput(rvp); - - return rv; -} - -void -rump_mnt_destroy(struct mount *mp) -{ - - /* See rcvp XXX above */ - cwdi0.cwdi_rdir = NULL; - vref(rootvnode); - cwdi0.cwdi_cdir = rootvnode; - - mount_finispecific(mp); - kmem_free(mp, sizeof(*mp)); -} - struct componentname * rump_makecn(u_long nameiop, u_long flags, const char *name, size_t namelen, kauth_cred_t creds, struct lwp *l) @@ -373,40 +310,6 @@ } void -rump_vp_decref(struct vnode *vp) -{ - - mutex_enter(&vp->v_interlock); - --vp->v_usecount; - mutex_exit(&vp->v_interlock); -} - -/* - * Really really recycle with a cherry on top. We should be - * extra-sure we can do this. For example with p2k there is - * no problem, since puffs in the kernel takes care of refcounting - * for us. - */ -void -rump_vp_recycle_nokidding(struct vnode *vp) -{ - - mutex_enter(&vp->v_interlock); - vp->v_usecount = 1; - /* - * XXX: NFS holds a reference to the root vnode, so don't clean - * it out. This is very wrong, but fixing it properly would - * take too much effort for now - */ - if (vp->v_tag == VT_NFS && vp->v_vflag & VV_ROOT) { - mutex_exit(&vp->v_interlock); - return; - } - vclean(vp, DOCLOSE); - vrelel(vp, 0); -} - -void rump_vp_rele(struct vnode *vp) {