Module Name: src
Committed By: reinoud
Date: Wed Jul 8 19:04:08 UTC 2009
Modified Files:
src/sys/fs/udf: udf_strat_rmw.c
Log Message:
Fix alternating oddity in RMW strategy. Even when in the reading state it
would push out elements to fillup-read only when the time had come for them.
This could then trickle feed the read queue slowly, but fast enough to prevent
it from switching state.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/fs/udf/udf_strat_rmw.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/fs/udf/udf_strat_rmw.c
diff -u src/sys/fs/udf/udf_strat_rmw.c:1.21 src/sys/fs/udf/udf_strat_rmw.c:1.22
--- src/sys/fs/udf/udf_strat_rmw.c:1.21 Mon Jul 6 17:13:38 2009
+++ src/sys/fs/udf/udf_strat_rmw.c Wed Jul 8 19:04:08 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_rmw.c,v 1.21 2009/07/06 17:13:38 reinoud Exp $ */
+/* $NetBSD: udf_strat_rmw.c,v 1.22 2009/07/08 19:04:08 reinoud Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.21 2009/07/06 17:13:38 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.22 2009/07/08 19:04:08 reinoud Exp $");
#endif /* not lint */
@@ -1214,10 +1214,12 @@
if (eccline == NULL)
break;
- /* all others are later, so if not satisfied, abort */
- if ((eccline->wait_time.tv_sec - now.tv_sec > 0)) {
- UDF_UNLOCK_ECCLINE(eccline);
- break;
+ /* if not reading, wait until the time has come */
+ if ((priv->cur_queue != UDF_SHED_READING) &&
+ (eccline->wait_time.tv_sec - now.tv_sec > 0)) {
+ UDF_UNLOCK_ECCLINE(eccline);
+ /* all others are later, so break off */
+ break;
}
/* release */