Module Name:    src
Committed By:   snj
Date:           Thu Jul  9 19:53:49 UTC 2009

Modified Files:
        src/sys/fs/udf [netbsd-5]: udf_strat_rmw.c

Log Message:
Pull up following revision(s) (requested by reinoud in ticket #853):
        sys/fs/udf/udf_strat_rmw.c: revision 1.22
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.9.4.9 -r1.9.4.10 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.9.4.9 src/sys/fs/udf/udf_strat_rmw.c:1.9.4.10
--- src/sys/fs/udf/udf_strat_rmw.c:1.9.4.9	Thu Jul  9 19:44:34 2009
+++ src/sys/fs/udf/udf_strat_rmw.c	Thu Jul  9 19:53:49 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_rmw.c,v 1.9.4.9 2009/07/09 19:44:34 snj Exp $ */
+/* $NetBSD: udf_strat_rmw.c,v 1.9.4.10 2009/07/09 19:53:49 snj 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.9.4.9 2009/07/09 19:44:34 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_rmw.c,v 1.9.4.10 2009/07/09 19:53:49 snj 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 */

Reply via email to