Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev pass also DIOCGCACHE to underlying device, so that u...
details: https://anonhg.NetBSD.org/src/rev/64d0eb5174ac
branches: trunk
changeset: 351811:64d0eb5174ac
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Feb 27 21:25:45 2017 +0000
description:
pass also DIOCGCACHE to underlying device, so that upper layers would be able
to get device cache properties without knowing the topology
diffstat:
sys/dev/cgd.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diffs (36 lines):
diff -r aa519a676ad0 -r 64d0eb5174ac sys/dev/cgd.c
--- a/sys/dev/cgd.c Mon Feb 27 20:29:00 2017 +0000
+++ b/sys/dev/cgd.c Mon Feb 27 21:25:45 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.113 2016/12/22 20:57:33 kamil Exp $ */
+/* $NetBSD: cgd.c,v 1.114 2017/02/27 21:25:45 jdolecek Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.113 2016/12/22 20:57:33 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.114 2017/02/27 21:25:45 jdolecek Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -715,14 +715,10 @@
if (DK_BUSY(&cs->sc_dksc, pmask))
return EBUSY;
return cgd_ioctl_clr(cs, l);
+ case DIOCGCACHE:
case DIOCCACHESYNC:
- /*
- * XXX Do we really need to care about having a writable
- * file descriptor here?
- */
- if ((flag & FWRITE) == 0)
- return (EBADF);
-
+ if (!DK_ATTACHED(dksc))
+ return ENOENT;
/*
* We pass this call down to the underlying disk.
*/
Home |
Main Index |
Thread Index |
Old Index