Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/udf Remove dirtynodes_cv, it is only used for timed w...
details: https://anonhg.NetBSD.org/src/rev/9294dae1bec7
branches: trunk
changeset: 340130:9294dae1bec7
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Aug 24 08:30:17 2015 +0000
description:
Remove dirtynodes_cv, it is only used for timed waits without any signals.
Replace the cv_timedwait with kpause.
diffstat:
sys/fs/udf/udf.h | 3 +--
sys/fs/udf/udf_allocation.c | 9 +++------
sys/fs/udf/udf_subr.c | 7 +++----
sys/fs/udf/udf_vfsops.c | 6 ++----
4 files changed, 9 insertions(+), 16 deletions(-)
diffs (110 lines):
diff -r 60d1dc2e5720 -r 9294dae1bec7 sys/fs/udf/udf.h
--- a/sys/fs/udf/udf.h Mon Aug 24 08:13:07 2015 +0000
+++ b/sys/fs/udf/udf.h Mon Aug 24 08:30:17 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.h,v 1.48 2015/04/06 08:39:23 hannken Exp $ */
+/* $NetBSD: udf.h,v 1.49 2015/08/24 08:30:17 hannken Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -344,7 +344,6 @@
/* syncing */
int syncing; /* are we syncing? */
- kcondvar_t dirtynodes_cv; /* sleeping on sync */
/* late allocation */
int32_t uncommitted_lbs[UDF_PARTITIONS];
diff -r 60d1dc2e5720 -r 9294dae1bec7 sys/fs/udf/udf_allocation.c
--- a/sys/fs/udf/udf_allocation.c Mon Aug 24 08:13:07 2015 +0000
+++ b/sys/fs/udf/udf_allocation.c Mon Aug 24 08:30:17 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_allocation.c,v 1.37 2014/12/03 21:34:55 reinoud Exp $ */
+/* $NetBSD: udf_allocation.c,v 1.38 2015/08/24 08:30:17 hannken Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.37 2014/12/03 21:34:55 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_allocation.c,v 1.38 2015/08/24 08:30:17 hannken Exp $");
#endif /* not lint */
@@ -1084,11 +1084,8 @@
DPRINTF(RESERVE, ("udf_reserve_space: issuing sync\n"));
mutex_exit(&ump->allocate_mutex);
udf_do_sync(ump, FSCRED, 0);
- mutex_enter(&mntvnode_lock);
/* 1/8 second wait */
- cv_timedwait(&ump->dirtynodes_cv, &mntvnode_lock,
- hz/8);
- mutex_exit(&mntvnode_lock);
+ kpause("udfsync2", false, hz/8, NULL);
mutex_enter(&ump->allocate_mutex);
}
diff -r 60d1dc2e5720 -r 9294dae1bec7 sys/fs/udf/udf_subr.c
--- a/sys/fs/udf/udf_subr.c Mon Aug 24 08:13:07 2015 +0000
+++ b/sys/fs/udf/udf_subr.c Mon Aug 24 08:30:17 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.130 2015/04/20 13:44:16 riastradh Exp $ */
+/* $NetBSD: udf_subr.c,v 1.131 2015/08/24 08:30:17 hannken Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.130 2015/04/20 13:44:16 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.131 2015/08/24 08:30:17 hannken Exp $");
#endif /* not lint */
@@ -6433,8 +6433,7 @@
if (ndirty) {
/* 1/4 second wait */
- cv_timedwait(&ump->dirtynodes_cv, &mntvnode_lock,
- hz/4);
+ kpause("udfsync2", false, hz/4, NULL);
goto recount;
}
}
diff -r 60d1dc2e5720 -r 9294dae1bec7 sys/fs/udf/udf_vfsops.c
--- a/sys/fs/udf/udf_vfsops.c Mon Aug 24 08:13:07 2015 +0000
+++ b/sys/fs/udf/udf_vfsops.c Mon Aug 24 08:30:17 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vfsops.c,v 1.68 2015/04/06 08:39:23 hannken Exp $ */
+/* $NetBSD: udf_vfsops.c,v 1.69 2015/08/24 08:30:17 hannken Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.68 2015/04/06 08:39:23 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.69 2015/08/24 08:30:17 hannken Exp $");
#endif /* not lint */
@@ -262,7 +262,6 @@
mutex_destroy(&ump->ihash_lock);
mutex_destroy(&ump->logvol_mutex);
mutex_destroy(&ump->allocate_mutex);
- cv_destroy(&ump->dirtynodes_cv);
MPFREE(ump->vat_table, M_UDFVOLD);
@@ -583,7 +582,6 @@
mutex_init(&ump->logvol_mutex, MUTEX_DEFAULT, IPL_NONE);
mutex_init(&ump->ihash_lock, MUTEX_DEFAULT, IPL_NONE);
mutex_init(&ump->allocate_mutex, MUTEX_DEFAULT, IPL_NONE);
- cv_init(&ump->dirtynodes_cv, "udfsync2");
/* init rbtree for nodes, ordered by their icb address (long_ad) */
udf_init_nodes_tree(ump);
Home |
Main Index |
Thread Index |
Old Index