Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/udf On switching from writing to reading explicitly s...



details:   https://anonhg.NetBSD.org/src/rev/ad3462a66648
branches:  trunk
changeset: 363383:ad3462a66648
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Tue Mar 08 10:52:43 2022 +0000

description:
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.

diffstat:

 sys/fs/udf/udf_strat_sequential.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 149315dc701c -r ad3462a66648 sys/fs/udf/udf_strat_sequential.c
--- a/sys/fs/udf/udf_strat_sequential.c Mon Mar 07 22:43:39 2022 +0000
+++ b/sys/fs/udf/udf_strat_sequential.c Tue Mar 08 10:52:43 2022 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index