From cb6989bfcfe26b610e6c1d7463c10cbd8f7e913b Mon Sep 17 00:00:00 2001 From: pooka Date: Thu, 9 Aug 2007 09:11:57 +0000 Subject: [PATCH] fool some KASSERTs --- sys/rump/librump/rumpkern/buffercache.c | 3 ++- sys/rump/librump/rumpkern/genfs.c | 12 +++++++++++- sys/rump/librump/rumpkern/lock_stub.c | 4 ++-- sys/rump/librump/rumpkern/vfsops_stub.c | 3 +-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/rump/librump/rumpkern/buffercache.c b/sys/rump/librump/rumpkern/buffercache.c index e58b8c459188..ae06aacdae6d 100644 --- a/sys/rump/librump/rumpkern/buffercache.c +++ b/sys/rump/librump/rumpkern/buffercache.c @@ -1,4 +1,4 @@ -/* $NetBSD: buffercache.c,v 1.2 2007/08/09 08:56:44 pooka Exp $ */ +/* $NetBSD: buffercache.c,v 1.3 2007/08/09 09:11:57 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -53,6 +53,7 @@ bread(struct vnode *vp, daddr_t blkno, int size, struct kauth_cred *cred, bp = getblk(vp, blkno, size, 0, 0); bp->b_flags = B_READ; VOP_STRATEGY(vp, bp); + bp->b_flags = B_BUSY; *bpp = bp; return 0; diff --git a/sys/rump/librump/rumpkern/genfs.c b/sys/rump/librump/rumpkern/genfs.c index 45a25abb5808..f7e90a147a3f 100644 --- a/sys/rump/librump/rumpkern/genfs.c +++ b/sys/rump/librump/rumpkern/genfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: genfs.c,v 1.7 2007/08/09 08:56:44 pooka Exp $ */ +/* $NetBSD: genfs.c,v 1.8 2007/08/09 09:11:57 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -70,6 +70,16 @@ genfs_directio(struct vnode *vp, struct uio *uio, int ioflag) panic("%s: not implemented", __func__); } +int +genfs_islocked(void *v) +{ + struct vop_islocked_args /* { + struct vnode *a_vp; + } */ *ap = v; + + return lockstatus(ap->a_vp->v_vnlock); +} + int genfs_getpages(void *v) { diff --git a/sys/rump/librump/rumpkern/lock_stub.c b/sys/rump/librump/rumpkern/lock_stub.c index 45bbfade720c..7bb83158d695 100644 --- a/sys/rump/librump/rumpkern/lock_stub.c +++ b/sys/rump/librump/rumpkern/lock_stub.c @@ -1,4 +1,4 @@ -/* $NetBSD: lock_stub.c,v 1.3 2007/08/09 08:56:45 pooka Exp $ */ +/* $NetBSD: lock_stub.c,v 1.4 2007/08/09 09:11:57 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -52,7 +52,7 @@ int lockstatus(struct lock *lock) { - return 0; + return LK_EXCLUSIVE; } void diff --git a/sys/rump/librump/rumpkern/vfsops_stub.c b/sys/rump/librump/rumpkern/vfsops_stub.c index 90358a36e25d..c9a267a65ebb 100644 --- a/sys/rump/librump/rumpkern/vfsops_stub.c +++ b/sys/rump/librump/rumpkern/vfsops_stub.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfsops_stub.c,v 1.2 2007/08/08 14:07:35 pooka Exp $ */ +/* $NetBSD: vfsops_stub.c,v 1.3 2007/08/09 09:11:57 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -81,7 +81,6 @@ VFSSTUB(genfs_compat_getpages) VFSSTUB_RV(genfs_lock, 0) VFSSTUB_RV(genfs_unlock, 0) -VFSSTUB_RV(genfs_islocked, 1) VFSSTUB_RV(genfs_nullop, 0) VFSSTUB_RV(genfs_eopnotsupp, EOPNOTSUPP) VFSSTUB_RV(genfs_enoioctl, EPASSTHROUGH)