Module Name:    src
Committed By:   reinoud
Date:           Tue Mar  8 10:52:43 UTC 2022

Modified Files:
        src/sys/fs/udf: udf_strat_sequential.c

Log Message:
On switching from writing to reading explicitly synchronize the caches. It
isn't strictly needed but some devices in the wild will otherwise bluntly
ignore all reading commands resulting in a kernel and device lockup.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/fs/udf/udf_strat_sequential.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_sequential.c
diff -u src/sys/fs/udf/udf_strat_sequential.c:1.15 src/sys/fs/udf/udf_strat_sequential.c:1.16
--- src/sys/fs/udf/udf_strat_sequential.c:1.15	Tue May 24 09:55:57 2016
+++ src/sys/fs/udf/udf_strat_sequential.c	Tue Mar  8 10:52:43 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_strat_sequential.c,v 1.15 2016/05/24 09:55:57 reinoud Exp $ */
+/* $NetBSD: udf_strat_sequential.c,v 1.16 2022/03/08 10:52:43 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.15 2016/05/24 09:55:57 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_strat_sequential.c,v 1.16 2022/03/08 10:52:43 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -549,6 +549,8 @@ udf_doshedule(struct udf_mount *ump)
 	if (new_queue != priv->cur_queue) {
 		DPRINTF(SHEDULE, ("switching from %d to %d\n",
 			priv->cur_queue, new_queue));
+		if (new_queue == UDF_SHED_READING)
+			udf_mmc_synchronise_caches(ump);
 	}
 
 	priv->cur_queue = new_queue;

Reply via email to