Module Name: src
Committed By: hannken
Date: Sun Jun 4 08:05:42 UTC 2017
Modified Files:
src/share/man/man9: fstrans.9
src/sys/kern: vfs_mount.c vfs_trans.c vfs_vnode.c vnode_if.c
src/sys/miscfs/genfs: genfs_io.c layer_vnops.c
src/sys/rump/include/rump: rumpvnode_if.h
src/sys/rump/librump/rumpkern: emul.c
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: fstrans.h vnode_if.h
src/sys/ufs/lfs: lfs_pages.c
Log Message:
Operations fstrans_start() and fstrans_start_nowait() now always
use FSTRANS_SHARED as lock type so remove the lock type argument.
File system state FSTRANS_SUSPENDING is now unused so remove it.
Regen vnode_if files.
Ride 8.99.1 less than a hour ago.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/share/man/man9/fstrans.9
cvs rdiff -u -r1.65 -r1.66 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.45 -r1.46 src/sys/kern/vfs_trans.c
cvs rdiff -u -r1.95 -r1.96 src/sys/kern/vfs_vnode.c
cvs rdiff -u -r1.105 -r1.106 src/sys/kern/vnode_if.c
cvs rdiff -u -r1.68 -r1.69 src/sys/miscfs/genfs/genfs_io.c
cvs rdiff -u -r1.66 -r1.67 src/sys/miscfs/genfs/layer_vnops.c
cvs rdiff -u -r1.29 -r1.30 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.181 -r1.182 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.29 -r1.30 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/fstrans.h
cvs rdiff -u -r1.100 -r1.101 src/sys/sys/vnode_if.h
cvs rdiff -u -r1.11 -r1.12 src/sys/ufs/lfs/lfs_pages.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/man/man9/fstrans.9
diff -u src/share/man/man9/fstrans.9:1.24 src/share/man/man9/fstrans.9:1.25
--- src/share/man/man9/fstrans.9:1.24 Mon May 29 08:03:13 2017
+++ src/share/man/man9/fstrans.9 Sun Jun 4 08:05:41 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: fstrans.9,v 1.24 2017/05/29 08:03:13 wiz Exp $
+.\" $NetBSD: fstrans.9,v 1.25 2017/06/04 08:05:41 hannken Exp $
.\"
.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd May 29, 2017
+.Dd June 4, 2017
.Dt FSTRANS 9
.Os
.Sh NAME
@@ -46,9 +46,9 @@
.In sys/mount.h
.In sys/fstrans.h
.Ft void
-.Fn fstrans_start "struct mount *mp" "enum fstrans_lock_type lock_type"
+.Fn fstrans_start "struct mount *mp"
.Ft int
-.Fn fstrans_start_nowait "struct mount *mp" "enum fstrans_lock_type lock_type"
+.Fn fstrans_start_nowait "struct mount *mp"
.Ft void
.Fn fstrans_done "struct mount *mp"
.Ft int
@@ -81,17 +81,6 @@ in a
transaction, which is blocked by suspending the file system and while
it is suspended.
.Pp
-Operations needed to sync the file system to its backing store must be
-bracketed by
-.Fn fstrans_start
-and
-.Fn fstrans_done
-in a
-.Em lazy
-transaction, which is allowed while suspending the file system in order
-to sync it to its backing store, but blocked while the file system is
-suspended.
-.Pp
Transactions are per-thread and nestable: if a thread is already in a
transaction, it can enter another transaction without blocking.
Each
@@ -108,12 +97,8 @@ to:
.Bl -dash
.It
enter the
-.Dv FSTRANS_SUSPENDING
-to suspend all normal operations but allow syncing,
-.It
-enter the
.Dv FSTRANS_SUSPENDED
-state to suspend all operations once synced, and
+state to suspend all operations, and
.It
restore to the
.Dv FSTRANS_NORMAL
@@ -140,24 +125,14 @@ The copy-on-write callback must be dises
when the file system is done with it.
.Sh FUNCTIONS
.Bl -tag -width abcd
-.It Fn fstrans_start "mp" "lock_type"
-Enter a transaction of type
-.Fa lock_type
-on the file system
+.It Fn fstrans_start "mp"
+Enter a transaction on the file system
.Fa mp
in the current thread.
If the file system is in a state that blocks such transactions, wait
until it changes state to one that does not.
-.Bl -tag -width FSTRANS_SHARED
-.It Dv FSTRANS_SHARED
-If the file system is suspending or suspended, wait until it is
-resumed.
-Intended for normal file system operations.
-.It Dv FSTRANS_LAZY
+.Pp
If the file system is suspended, wait until it is resumed.
-Intended for operations needed to sync the file system to its backing
-store in order to suspend it.
-.El
.Pp
However, if the current thread is already in a transaction on
.Fa mp ,
@@ -166,14 +141,12 @@ will enter a nested transaction and retu
waiting.
.Pp
May sleep.
-.It Fn fstrans_start_nowait "mp" "lock_type"
+.It Fn fstrans_start_nowait "mp"
Like
.Fn fstrans_start ,
but return
.Dv EBUSY
-immediately if
-.Fa lock_type
-transactions are blocked in its current state.
+immediately if transactions are blocked in its current state.
.Pp
May sleep nevertheless on internal locks.
.It Fn fstrans_done "mp"
@@ -192,15 +165,9 @@ to
and wait for all transactions not allowed in
.Fa new_state
to complete.
-.Bl -tag -width FSTRANS_SUSPENDING
+.Bl -tag -width FSTRANS_SUSPENDED
.It Dv FSTRANS_NORMAL
Allow all transactions.
-.It Dv FSTRANS_SUSPENDING
-Block
-.Dv FSTRANS_SHARED
-transactions but allow
-.Dv FSTRANS_LAZY
-transactions.
.It Dv FSTRANS_SUSPENDED
Block all transactions.
.El
@@ -277,12 +244,6 @@ xxx_suspendctl(struct mount *mp, int cmd
switch (cmd) {
case SUSPEND_SUSPEND:
- error = fstrans_setstate(mp, FSTRANS_SUSPENDING);
- if (error)
- return error;
-
- /* Sync file system state to disk. */
-
return fstrans_setstate(mp, FSTRANS_SUSPENDED);
case SUSPEND_RESUME:
@@ -303,7 +264,7 @@ xxx_create(void *v)
struct mount *mp = ap-\*[Gt]a_dvp-\*[Gt]v_mount;
int error;
- fstrans_start(mp, FSTRANS_SHARED);
+ fstrans_start(mp);
/* Actually create the node. */
Index: src/sys/kern/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.65 src/sys/kern/vfs_mount.c:1.66
--- src/sys/kern/vfs_mount.c:1.65 Thu Jun 1 02:45:13 2017
+++ src/sys/kern/vfs_mount.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_mount.c,v 1.65 2017/06/01 02:45:13 chs Exp $ */
+/* $NetBSD: vfs_mount.c,v 1.66 2017/06/04 08:05:42 hannken Exp $ */
/*-
* Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.65 2017/06/01 02:45:13 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.66 2017/06/04 08:05:42 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -319,9 +319,9 @@ _vfs_busy(struct mount *mp, bool wait)
KASSERT(mp->mnt_refcnt > 0);
if (wait) {
- fstrans_start(mp, FSTRANS_SHARED);
+ fstrans_start(mp);
} else {
- if (fstrans_start_nowait(mp, FSTRANS_SHARED))
+ if (fstrans_start_nowait(mp))
return EBUSY;
}
if (__predict_false((mp->mnt_iflag & IMNT_GONE) != 0)) {
Index: src/sys/kern/vfs_trans.c
diff -u src/sys/kern/vfs_trans.c:1.45 src/sys/kern/vfs_trans.c:1.46
--- src/sys/kern/vfs_trans.c:1.45 Sun May 7 08:24:20 2017
+++ src/sys/kern/vfs_trans.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_trans.c,v 1.45 2017/05/07 08:24:20 hannken Exp $ */
+/* $NetBSD: vfs_trans.c,v 1.46 2017/06/04 08:05:42 hannken Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.45 2017/05/07 08:24:20 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.46 2017/06/04 08:05:42 hannken Exp $");
/*
* File system transaction operations.
@@ -48,12 +48,16 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,
#include <sys/mount.h>
#include <sys/pserialize.h>
#include <sys/vnode.h>
-#define _FSTRANS_API_PRIVATE
#include <sys/fstrans.h>
#include <sys/proc.h>
#include <miscfs/specfs/specdev.h>
+enum fstrans_lock_type {
+ FSTRANS_SHARED, /* Granted while not suspending */
+ FSTRANS_EXCL /* Internal: exclusive lock */
+};
+
struct fscow_handler {
LIST_ENTRY(fscow_handler) ch_list;
int (*ch_func)(void *, struct buf *, bool);
@@ -89,6 +93,7 @@ static inline struct mount *fstrans_norm
static void fstrans_lwp_dtor(void *);
static void fstrans_mount_dtor(struct mount *);
static struct fstrans_lwp_info *fstrans_get_lwp_info(struct mount *, bool);
+static inline int _fstrans_start(struct mount *, enum fstrans_lock_type, int);
static bool grant_lock(const enum fstrans_state, const enum fstrans_lock_type);
static bool state_change_done(const struct mount *);
static bool cow_state_change_done(const struct mount *);
@@ -314,8 +319,6 @@ grant_lock(const enum fstrans_state stat
return true;
if (type == FSTRANS_EXCL)
return true;
- if (state == FSTRANS_SUSPENDING && type == FSTRANS_LAZY)
- return true;
return false;
}
@@ -324,7 +327,7 @@ grant_lock(const enum fstrans_state stat
* Start a transaction. If this thread already has a transaction on this
* file system increment the reference counter.
*/
-int
+static inline int
_fstrans_start(struct mount *mp, enum fstrans_lock_type lock_type, int wait)
{
int s;
@@ -380,6 +383,22 @@ _fstrans_start(struct mount *mp, enum fs
return 0;
}
+void
+fstrans_start(struct mount *mp)
+{
+ int error __diagused;
+
+ error = _fstrans_start(mp, FSTRANS_SHARED, 1);
+ KASSERT(error == 0);
+}
+
+int
+fstrans_start_nowait(struct mount *mp)
+{
+
+ return _fstrans_start(mp, FSTRANS_SHARED, 0);
+}
+
/*
* Finish a transaction.
*/
@@ -502,7 +521,7 @@ fstrans_setstate(struct mount *mp, enum
if (old_state != new_state) {
if (old_state == FSTRANS_NORMAL)
- fstrans_start(mp, FSTRANS_EXCL);
+ _fstrans_start(mp, FSTRANS_EXCL, 1);
if (new_state == FSTRANS_NORMAL)
fstrans_done(mp);
}
@@ -805,9 +824,6 @@ fstrans_print_lwp(struct proc *p, struct
printf(" -");
} else {
switch (fli->fli_lock_type) {
- case FSTRANS_LAZY:
- printf(" lazy");
- break;
case FSTRANS_SHARED:
printf(" shared");
break;
@@ -842,9 +858,6 @@ fstrans_print_mount(struct mount *mp, in
case FSTRANS_NORMAL:
printf("state normal\n");
break;
- case FSTRANS_SUSPENDING:
- printf("state suspending\n");
- break;
case FSTRANS_SUSPENDED:
printf("state suspended\n");
break;
Index: src/sys/kern/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.95 src/sys/kern/vfs_vnode.c:1.96
--- src/sys/kern/vfs_vnode.c:1.95 Sun Jun 4 08:02:26 2017
+++ src/sys/kern/vfs_vnode.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.95 2017/06/04 08:02:26 hannken Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.96 2017/06/04 08:05:42 hannken Exp $ */
/*-
* Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -156,7 +156,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.95 2017/06/04 08:02:26 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.96 2017/06/04 08:05:42 hannken Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -526,7 +526,7 @@ vdrain_remove(vnode_t *vp)
return;
}
mp = vp->v_mount;
- if (fstrans_start_nowait(mp, FSTRANS_SHARED) != 0) {
+ if (fstrans_start_nowait(mp) != 0) {
mutex_exit(vp->v_interlock);
return;
}
@@ -556,7 +556,7 @@ vdrain_vrele(vnode_t *vp)
KASSERT(mutex_owned(&vdrain_lock));
mp = vp->v_mount;
- if (fstrans_start_nowait(mp, FSTRANS_SHARED) != 0)
+ if (fstrans_start_nowait(mp) != 0)
return;
/*
@@ -1561,7 +1561,7 @@ vcache_reclaim(vnode_t *vp)
vip->vi_key.vk_key = temp_key;
mutex_exit(&vcache_lock);
- fstrans_start(mp, FSTRANS_SHARED);
+ fstrans_start(mp);
/*
* Clean out any cached data associated with the vnode.
Index: src/sys/kern/vnode_if.c
diff -u src/sys/kern/vnode_if.c:1.105 src/sys/kern/vnode_if.c:1.106
--- src/sys/kern/vnode_if.c:1.105 Sun Jun 4 08:00:27 2017
+++ src/sys/kern/vnode_if.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode_if.c,v 1.105 2017/06/04 08:00:27 hannken Exp $ */
+/* $NetBSD: vnode_if.c,v 1.106 2017/06/04 08:05:42 hannken Exp $ */
/*
* Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
* Created from the file:
* NetBSD: vnode_if.src,v 1.76 2017/06/04 07:59:17 hannken Exp
* by the script:
- * NetBSD: vnode_if.sh,v 1.65 2017/06/04 07:59:17 hannken Exp
+ * NetBSD: vnode_if.sh,v 1.66 2017/06/04 08:03:26 hannken Exp
*/
/*
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.105 2017/06/04 08:00:27 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.106 2017/06/04 08:05:42 hannken Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -66,7 +66,7 @@ vop_pre(vnode_t *vp, struct mount **mp,
for (;;) {
*mp = vp->v_mount;
if (op == FST_TRY) {
- error = fstrans_start_nowait(*mp, FSTRANS_SHARED);
+ error = fstrans_start_nowait(*mp);
if (error) {
if (!*mpsafe) {
KERNEL_UNLOCK_ONE(curlwp);
@@ -74,7 +74,7 @@ vop_pre(vnode_t *vp, struct mount **mp,
return error;
}
} else {
- fstrans_start(*mp, FSTRANS_SHARED);
+ fstrans_start(*mp);
}
if (__predict_true(*mp == vp->v_mount))
break;
Index: src/sys/miscfs/genfs/genfs_io.c
diff -u src/sys/miscfs/genfs/genfs_io.c:1.68 src/sys/miscfs/genfs/genfs_io.c:1.69
--- src/sys/miscfs/genfs/genfs_io.c:1.68 Sat Apr 1 23:34:17 2017
+++ src/sys/miscfs/genfs/genfs_io.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: genfs_io.c,v 1.68 2017/04/01 23:34:17 dholland Exp $ */
+/* $NetBSD: genfs_io.c,v 1.69 2017/06/04 08:05:42 hannken Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.68 2017/04/01 23:34:17 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.69 2017/06/04 08:05:42 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -293,7 +293,7 @@ startover:
if (trans_mount == NULL) {
trans_mount = vp->v_mount;
- fstrans_start(trans_mount, FSTRANS_SHARED);
+ fstrans_start(trans_mount);
/*
* check if this vnode is still valid.
*/
@@ -891,7 +891,7 @@ retry:
if (pagedaemon) {
/* Pagedaemon must not sleep here. */
trans_mp = vp->v_mount;
- error = fstrans_start_nowait(trans_mp, FSTRANS_SHARED);
+ error = fstrans_start_nowait(trans_mp);
if (error) {
mutex_exit(slock);
return error;
@@ -904,7 +904,7 @@ retry:
*/
mutex_exit(slock);
trans_mp = vp->v_mount;
- fstrans_start(trans_mp, FSTRANS_SHARED);
+ fstrans_start(trans_mp);
if (vp->v_mount != trans_mp) {
fstrans_done(trans_mp);
trans_mp = NULL;
Index: src/sys/miscfs/genfs/layer_vnops.c
diff -u src/sys/miscfs/genfs/layer_vnops.c:1.66 src/sys/miscfs/genfs/layer_vnops.c:1.67
--- src/sys/miscfs/genfs/layer_vnops.c:1.66 Fri May 26 14:21:01 2017
+++ src/sys/miscfs/genfs/layer_vnops.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: layer_vnops.c,v 1.66 2017/05/26 14:21:01 riastradh Exp $ */
+/* $NetBSD: layer_vnops.c,v 1.67 2017/06/04 08:05:42 hannken Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@@ -170,7 +170,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: layer_vnops.c,v 1.66 2017/05/26 14:21:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: layer_vnops.c,v 1.67 2017/06/04 08:05:42 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -806,7 +806,7 @@ layer_getpages(void *v)
/* Just pass the request on to the underlying layer. */
mutex_exit(vp->v_interlock);
- fstrans_start(mp, FSTRANS_SHARED);
+ fstrans_start(mp);
mutex_enter(vp->v_interlock);
if (mp == vp->v_mount) {
/* Will release the interlock. */
Index: src/sys/rump/include/rump/rumpvnode_if.h
diff -u src/sys/rump/include/rump/rumpvnode_if.h:1.29 src/sys/rump/include/rump/rumpvnode_if.h:1.30
--- src/sys/rump/include/rump/rumpvnode_if.h:1.29 Sun Jun 4 08:00:27 2017
+++ src/sys/rump/include/rump/rumpvnode_if.h Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpvnode_if.h,v 1.29 2017/06/04 08:00:27 hannken Exp $ */
+/* $NetBSD: rumpvnode_if.h,v 1.30 2017/06/04 08:05:42 hannken Exp $ */
/*
* Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
* Created from the file:
* NetBSD: vnode_if.src,v 1.76 2017/06/04 07:59:17 hannken Exp
* by the script:
- * NetBSD: vnode_if.sh,v 1.65 2017/06/04 07:59:17 hannken Exp
+ * NetBSD: vnode_if.sh,v 1.66 2017/06/04 08:03:26 hannken Exp
*/
/*
Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.181 src/sys/rump/librump/rumpkern/emul.c:1.182
--- src/sys/rump/librump/rumpkern/emul.c:1.181 Wed Feb 22 11:20:59 2017
+++ src/sys/rump/librump/rumpkern/emul.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: emul.c,v 1.181 2017/02/22 11:20:59 hannken Exp $ */
+/* $NetBSD: emul.c,v 1.182 2017/06/04 08:05:42 hannken Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.181 2017/02/22 11:20:59 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.182 2017/06/04 08:05:42 hannken Exp $");
#include <sys/param.h>
#include <sys/cprng.h>
@@ -243,14 +243,22 @@ __strong_alias(_delay,rump_delay);
/* Weak aliases for fstrans to be used unless librumpvfs is present. */
-int rump__fstrans_start(struct mount *, enum fstrans_lock_type, int);
+void rump_fstrans_start(struct mount *);
+void
+rump_fstrans_start(struct mount *mp)
+{
+
+}
+__weak_alias(fstrans_start,rump_fstrans_start);
+
+int rump_fstrans_start_nowait(struct mount *);
int
-rump__fstrans_start(struct mount *mp, enum fstrans_lock_type lock, int wait)
+rump_fstrans_start_nowait(struct mount *mp)
{
return 0;
}
-__weak_alias(_fstrans_start,rump__fstrans_start);
+__weak_alias(fstrans_start_nowait,rump_fstrans_start_nowait);
void rump_fstrans_done(struct mount *);
void
Index: src/sys/rump/librump/rumpvfs/rumpvnode_if.c
diff -u src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.29 src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.30
--- src/sys/rump/librump/rumpvfs/rumpvnode_if.c:1.29 Sun Jun 4 08:00:27 2017
+++ src/sys/rump/librump/rumpvfs/rumpvnode_if.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpvnode_if.c,v 1.29 2017/06/04 08:00:27 hannken Exp $ */
+/* $NetBSD: rumpvnode_if.c,v 1.30 2017/06/04 08:05:42 hannken Exp $ */
/*
* Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
* Created from the file:
* NetBSD: vnode_if.src,v 1.76 2017/06/04 07:59:17 hannken Exp
* by the script:
- * NetBSD: vnode_if.sh,v 1.65 2017/06/04 07:59:17 hannken Exp
+ * NetBSD: vnode_if.sh,v 1.66 2017/06/04 08:03:26 hannken Exp
*/
/*
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.29 2017/06/04 08:00:27 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.30 2017/06/04 08:05:42 hannken Exp $");
#include <sys/param.h>
#include <sys/mount.h>
Index: src/sys/sys/fstrans.h
diff -u src/sys/sys/fstrans.h:1.10 src/sys/sys/fstrans.h:1.11
--- src/sys/sys/fstrans.h:1.10 Fri Nov 7 00:15:42 2008
+++ src/sys/sys/fstrans.h Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fstrans.h,v 1.10 2008/11/07 00:15:42 joerg Exp $ */
+/* $NetBSD: fstrans.h,v 1.11 2017/06/04 08:05:42 hannken Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -41,25 +41,14 @@
#define SUSPEND_SUSPEND 0x0001 /* VFS_SUSPENDCTL: suspend */
#define SUSPEND_RESUME 0x0002 /* VFS_SUSPENDCTL: resume */
-enum fstrans_lock_type {
- FSTRANS_LAZY = 1, /* Granted while not suspended */
- FSTRANS_SHARED = 2 /* Granted while not suspending */
-#ifdef _FSTRANS_API_PRIVATE
- ,
- FSTRANS_EXCL = 3 /* Internal: exclusive lock */
-#endif /* _FSTRANS_API_PRIVATE */
-};
-
enum fstrans_state {
FSTRANS_NORMAL,
- FSTRANS_SUSPENDING,
FSTRANS_SUSPENDED
};
void fstrans_init(void);
-#define fstrans_start(mp, t) _fstrans_start((mp), (t), 1)
-#define fstrans_start_nowait(mp, t) _fstrans_start((mp), (t), 0)
-int _fstrans_start(struct mount *, enum fstrans_lock_type, int);
+void fstrans_start(struct mount *);
+int fstrans_start_nowait(struct mount *);
void fstrans_done(struct mount *);
int fstrans_is_owner(struct mount *);
int fstrans_mount(struct mount *);
Index: src/sys/sys/vnode_if.h
diff -u src/sys/sys/vnode_if.h:1.100 src/sys/sys/vnode_if.h:1.101
--- src/sys/sys/vnode_if.h:1.100 Sun Jun 4 08:00:27 2017
+++ src/sys/sys/vnode_if.h Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode_if.h,v 1.100 2017/06/04 08:00:27 hannken Exp $ */
+/* $NetBSD: vnode_if.h,v 1.101 2017/06/04 08:05:42 hannken Exp $ */
/*
* Warning: DO NOT EDIT! This file is automatically generated!
@@ -7,7 +7,7 @@
* Created from the file:
* NetBSD: vnode_if.src,v 1.76 2017/06/04 07:59:17 hannken Exp
* by the script:
- * NetBSD: vnode_if.sh,v 1.65 2017/06/04 07:59:17 hannken Exp
+ * NetBSD: vnode_if.sh,v 1.66 2017/06/04 08:03:26 hannken Exp
*/
/*
Index: src/sys/ufs/lfs/lfs_pages.c
diff -u src/sys/ufs/lfs/lfs_pages.c:1.11 src/sys/ufs/lfs/lfs_pages.c:1.12
--- src/sys/ufs/lfs/lfs_pages.c:1.11 Sat Apr 1 17:34:21 2017
+++ src/sys/ufs/lfs/lfs_pages.c Sun Jun 4 08:05:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_pages.c,v 1.11 2017/04/01 17:34:21 maya Exp $ */
+/* $NetBSD: lfs_pages.c,v 1.12 2017/06/04 08:05:42 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_pages.c,v 1.11 2017/04/01 17:34:21 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_pages.c,v 1.12 2017/06/04 08:05:42 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -596,7 +596,7 @@ retry:
if (pagedaemon) {
/* Pagedaemon must not sleep here. */
trans_mp = vp->v_mount;
- error = fstrans_start_nowait(trans_mp, FSTRANS_SHARED);
+ error = fstrans_start_nowait(trans_mp);
if (error) {
mutex_exit(vp->v_interlock);
return error;
@@ -609,7 +609,7 @@ retry:
*/
mutex_exit(vp->v_interlock);
trans_mp = vp->v_mount;
- fstrans_start(trans_mp, FSTRANS_SHARED);
+ fstrans_start(trans_mp);
if (vp->v_mount != trans_mp) {
fstrans_done(trans_mp);
trans_mp = NULL;