summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfsnode.h
diff options
context:
space:
mode:
authormarius <marius@openbsd.org>2004-08-03 17:11:48 +0000
committermarius <marius@openbsd.org>2004-08-03 17:11:48 +0000
commite4c869ec8327609a293def3e8847337759d4d9cb (patch)
treeeb48be1270ebac1033813884d587309208a26f97 /sys/nfs/nfsnode.h
parentadd an MLINK for mixer(4) that points to audio(4), (diff)
downloadwireguard-openbsd-e4c869ec8327609a293def3e8847337759d4d9cb.tar.xz
wireguard-openbsd-e4c869ec8327609a293def3e8847337759d4d9cb.zip
NFS commit coalescion: instead of sending a commit for each block, coalesce
these into larger ranges wherever possible. this should speed up NFS writes quite a bit. ok art@ millert@ pedro@ tedu@
Diffstat (limited to 'sys/nfs/nfsnode.h')
-rw-r--r--sys/nfs/nfsnode.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/nfs/nfsnode.h b/sys/nfs/nfsnode.h
index a0d49d6c3cd..ef09b6ff6a1 100644
--- a/sys/nfs/nfsnode.h
+++ b/sys/nfs/nfsnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfsnode.h,v 1.21 2004/04/26 18:57:36 millert Exp $ */
+/* $OpenBSD: nfsnode.h,v 1.22 2004/08/03 17:11:48 marius Exp $ */
/* $NetBSD: nfsnode.h,v 1.16 1996/02/18 11:54:04 fvdl Exp $ */
/*
@@ -43,6 +43,8 @@
#include <nfs/nfs.h>
#endif
+#include <sys/rwlock.h>
+
/*
* Silly rename structure that hangs off the nfsnode until the name
* can be removed by nfs_inactive()
@@ -115,8 +117,21 @@ struct nfsnode {
nfsfh_t n_fh; /* Small File Handle */
struct ucred *n_rcred;
struct ucred *n_wcred;
+
+ off_t n_pushedlo; /* 1st blk in commited range */
+ off_t n_pushedhi; /* Last block in range */
+ off_t n_pushlo; /* 1st block in commit range */
+ off_t n_pushhi; /* Last block in range */
+ struct rwlock n_commitlock; /* Serialize commits */
+ int n_commitflags;
};
+/*
+ * Values for n_commitflags
+ */
+#define NFS_COMMIT_PUSH_VALID 0x0001 /* push range valid */
+#define NFS_COMMIT_PUSHED_VALID 0x0002 /* pushed range valid */
+
#define n_atim n_un1.nf_atim
#define n_mtim n_un2.nf_mtim
#define n_sillyrename n_un3.nf_silly