summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2008-06-12 19:14:16 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2008-06-12 19:14:16 +0000
commit3d3206644e64e89ec391bfc42c96961e1bb9b527 (patch)
treef39a30ad8094bb56a7ef184f228dc9c1f7cbc6ab /sys/nfs
parent251ec3348ff74e05e3b3031a9c76446282d245c4 (diff)
add a statistic bit to count how often we change async to sync
you need to upgrade nfsstat and the relevant header files ok beck@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs.h3
-rw-r--r--sys/nfs/nfs_bio.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h
index 0e505e8b54b..437fced5ed0 100644
--- a/sys/nfs/nfs.h
+++ b/sys/nfs/nfs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs.h,v 1.30 2008/06/08 18:23:03 thib Exp $ */
+/* $OpenBSD: nfs.h,v 1.31 2008/06/12 19:14:15 thib Exp $ */
/* $NetBSD: nfs.h,v 1.10.4.1 1996/05/27 11:23:56 fvdl Exp $ */
/*
@@ -198,6 +198,7 @@ struct nfsstats {
uint64_t srvcache_idemdonehits;
uint64_t srvcache_nonidemdonehits;
uint64_t srvcache_misses;
+ uint64_t forcedsync;
uint64_t srvnqnfs_leases;
uint64_t srvnqnfs_maxleases;
uint64_t srvnqnfs_getleases;
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index f03cb5fd64a..e71beddf1a8 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_bio.c,v 1.49 2008/06/12 16:04:37 art Exp $ */
+/* $OpenBSD: nfs_bio.c,v 1.50 2008/06/12 19:14:15 thib Exp $ */
/* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */
/*
@@ -548,7 +548,8 @@ nfs_asyncio(bp)
int i;
if (nfs_numasync == 0)
- return (EIO);
+ goto out;
+
for (i = 0; i < NFS_MAXASYNCDAEMON; i++) {
if (nfs_iodwant[i]) {
if ((bp->b_flags & B_READ) == 0) {
@@ -562,6 +563,8 @@ nfs_asyncio(bp)
}
}
+out:
+ nfsstats.forcedsync++;
return (EIO);
}