Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs Support real file system transactio...
details: https://anonhg.NetBSD.org/src/rev/ddb9117f2690
branches: trunk
changeset: 753862:ddb9117f2690
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Apr 12 22:19:17 2010 +0000
description:
Support real file system transactions/suspension (vfs_trans.c)
instead of just stubbing it.
diffstat:
sys/rump/librump/rumpvfs/Makefile.rumpvfs | 6 +-
sys/rump/librump/rumpvfs/fstrans_stub.c | 121 ------------------------------
sys/rump/librump/rumpvfs/rump_vfs.c | 6 +-
3 files changed, 6 insertions(+), 127 deletions(-)
diffs (185 lines):
diff -r 919b3dcb15dc -r ddb9117f2690 sys/rump/librump/rumpvfs/Makefile.rumpvfs
--- a/sys/rump/librump/rumpvfs/Makefile.rumpvfs Mon Apr 12 22:17:23 2010 +0000
+++ b/sys/rump/librump/rumpvfs/Makefile.rumpvfs Mon Apr 12 22:19:17 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rumpvfs,v 1.26 2010/03/29 13:20:31 pooka Exp $
+# $NetBSD: Makefile.rumpvfs,v 1.27 2010/04/12 22:19:17 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@@ -17,8 +17,6 @@
#
SRCS= rump_vfs.c devnodes.c devnull.c rumpblk.c rumpfs.c vm_vfs.c
-SRCS+= fstrans_stub.c
-
SRCS+= rumpvfs_if_wrappers.c
# sys/kern I/O
@@ -27,7 +25,7 @@
# sys/kern vfs
SRCS+= vfs_bio.c vfs_cache.c vfs_cwd.c vfs_dirhash.c vfs_getcwd.c \
vfs_hooks.c vfs_init.c vfs_lockf.c vfs_lookup.c vfs_subr.c \
- vfs_syscalls.c vfs_vnops.c vfs_wapbl.c vfs_xattr.c
+ vfs_syscalls.c vfs_trans.c vfs_vnops.c vfs_wapbl.c vfs_xattr.c
# sys/kern module (and syscall)
SRCS+= kern_module_vfs.c subr_kobj_vfs.c sys_module.c
diff -r 919b3dcb15dc -r ddb9117f2690 sys/rump/librump/rumpvfs/fstrans_stub.c
--- a/sys/rump/librump/rumpvfs/fstrans_stub.c Mon Apr 12 22:17:23 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/* $NetBSD: fstrans_stub.c,v 1.2 2008/12/18 00:24:13 pooka Exp $ */
-
-/*
- * Copyright (c) 2007 Antti Kantee. All Rights Reserved.
- *
- * Development of this software was supported by Google Summer of Code.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fstrans_stub.c,v 1.2 2008/12/18 00:24:13 pooka Exp $");
-
-#include <sys/mount.h>
-#include <sys/fstrans.h>
-#include <sys/buf.h>
-
-int
-fstrans_setstate(struct mount *mp, enum fstrans_state new_state)
-{
-
- return 0;
-}
-
-enum fstrans_state
-fstrans_getstate(struct mount *mp)
-{
-
- return FSTRANS_NORMAL;
-}
-
-int
-_fstrans_start(struct mount *mp, enum fstrans_lock_type lock_type, int wait)
-{
-
- return 0;
-}
-
-void
-fstrans_done(struct mount *mp)
-{
-
- return;
-}
-
-int
-fstrans_is_owner(struct mount *mp)
-{
-
- return 1;
-}
-
-int
-fscow_establish(struct mount *mp, int (*func)(void *, struct buf *, bool),
- void *arg)
-{
-
- return 0;
-}
-
-int
-fscow_disestablish(struct mount *mp, int (*func)(void *, struct buf *, bool),
- void *arg)
-{
-
- return 0;
-}
-
-int
-fscow_run(struct buf *bp, bool data_valid)
-{
-
- bp->b_flags |= B_COWDONE;
- return 0;
-}
-
-int
-vfs_suspend(struct mount *mp, int nowait)
-{
-
- return ENOSYS;
-}
-
-void
-vfs_resume(struct mount *mp)
-{
-
- panic("%s: impossible", __func__);
-}
-
-int
-fstrans_mount(struct mount *mp)
-{
-
- return 0;
-}
-
-void
-fstrans_unmount(struct mount *mp)
-{
-
-}
diff -r 919b3dcb15dc -r ddb9117f2690 sys/rump/librump/rumpvfs/rump_vfs.c
--- a/sys/rump/librump/rumpvfs/rump_vfs.c Mon Apr 12 22:17:23 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs.c Mon Apr 12 22:19:17 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_vfs.c,v 1.44 2010/03/26 18:21:28 pooka Exp $ */
+/* $NetBSD: rump_vfs.c,v 1.45 2010/04/12 22:19:17 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -29,13 +29,14 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.44 2010/03/26 18:21:28 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.45 2010/04/12 22:19:17 pooka Exp $");
#include <sys/param.h>
#include <sys/buf.h>
#include <sys/conf.h>
#include <sys/evcnt.h>
#include <sys/filedesc.h>
+#include <sys/fstrans.h>
#include <sys/lockf.h>
#include <sys/kthread.h>
#include <sys/module.h>
@@ -102,6 +103,7 @@
cwd_sys_init();
lf_init();
spec_init();
+ fstrans_init();
if (rump_threads) {
if ((rv = kthread_create(PRI_BIO, KTHREAD_MPSAFE, NULL,
Home |
Main Index |
Thread Index |
Old Index