Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/dev Add empty DIOCCACHESYNC ioctl(2) for rd(4).



details:   https://anonhg.NetBSD.org/src/rev/477f66a1b404
branches:  trunk
changeset: 372495:477f66a1b404
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Dec 03 06:08:18 2022 +0000

description:
Add empty DIOCCACHESYNC ioctl(2) for rd(4).

Without this raid(4) always complains on various raidctl(8) ops:
> raid0: cache flush[0] to component 0 failed (22)

RAID1 configured by raid(4) just works HP-IB disks on hp300.

diffstat:

 sys/arch/hp300/dev/rd.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 4fa8f2800e44 -r 477f66a1b404 sys/arch/hp300/dev/rd.c
--- a/sys/arch/hp300/dev/rd.c   Sat Dec 03 01:04:42 2022 +0000
+++ b/sys/arch/hp300/dev/rd.c   Sat Dec 03 06:08:18 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rd.c,v 1.122 2022/12/01 15:02:11 tsutsui Exp $ */
+/*     $NetBSD: rd.c,v 1.123 2022/12/03 06:08:18 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.122 2022/12/01 15:02:11 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.123 2022/12/03 06:08:18 tsutsui Exp $");
 
 #include "opt_useleds.h"
 
@@ -1363,6 +1363,10 @@
        case DIOCGDEFLABEL:
                rdgetdefaultlabel(sc, (struct disklabel *)data);
                return 0;
+
+       case DIOCCACHESYNC:
+               /* no cache to be flushed but required to appease raid(4) */
+               return 0;
        }
        return EINVAL;
 }



Home | Main Index | Thread Index | Old Index