diff --git a/sys/fs/udf/udf.h b/sys/fs/udf/udf.h index db279da2d68c..4949fac4b1ca 100644 --- a/sys/fs/udf/udf.h +++ b/sys/fs/udf/udf.h @@ -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]; diff --git a/sys/fs/udf/udf_allocation.c b/sys/fs/udf/udf_allocation.c index eb14e251e286..63a5b895b57c 100644 --- a/sys/fs/udf/udf_allocation.c +++ b/sys/fs/udf/udf_allocation.c @@ -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 #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); } diff --git a/sys/fs/udf/udf_subr.c b/sys/fs/udf/udf_subr.c index 09126c59bb1c..e2857a8d7350 100644 --- a/sys/fs/udf/udf_subr.c +++ b/sys/fs/udf/udf_subr.c @@ -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 #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; } } diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 2ebce4bd86f2..c6143a594429 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -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 #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);