Remove dirtynodes_cv, it is only used for timed waits without any signals.
Replace the cv_timedwait with kpause.
This commit is contained in:
parent
ce93b3da57
commit
09f7c2773a
|
@ -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 @@ struct udf_mount {
|
|||
|
||||
/* syncing */
|
||||
int syncing; /* are we syncing? */
|
||||
kcondvar_t dirtynodes_cv; /* sleeping on sync */
|
||||
|
||||
/* late allocation */
|
||||
int32_t uncommitted_lbs[UDF_PARTITIONS];
|
||||
|
|
|
@ -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 @@ udf_reserve_space(struct udf_mount *ump, struct udf_node *udf_node,
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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 @@ recount:
|
|||
|
||||
if (ndirty) {
|
||||
/* 1/4 second wait */
|
||||
cv_timedwait(&ump->dirtynodes_cv, &mntvnode_lock,
|
||||
hz/4);
|
||||
kpause("udfsync2", false, hz/4, NULL);
|
||||
goto recount;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 @@ free_udf_mountinfo(struct mount *mp)
|
|||
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 @@ udf_mountfs(struct vnode *devvp, struct mount *mp,
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue