pass also DIOCGCACHE to underlying device, so that upper layers would be able
to get the device cache properties without knowing the topology; while here also pass down DIOCGSTRATEGY for neater dkctl(8) output
This commit is contained in:
parent
5ad012e578
commit
198ff4069d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dk.c,v 1.94 2017/01/19 00:44:40 maya Exp $ */
|
||||
/* $NetBSD: dk.c,v 1.95 2017/02/27 21:27:07 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.94 2017/01/19 00:44:40 maya Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.95 2017/02/27 21:27:07 jdolecek Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_dkwedge.h"
|
||||
|
@ -1478,16 +1478,10 @@ dkioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
|||
error = 0;
|
||||
|
||||
switch (cmd) {
|
||||
case DIOCGSTRATEGY:
|
||||
case DIOCGCACHE:
|
||||
case DIOCCACHESYNC:
|
||||
/*
|
||||
* XXX Do we really need to care about having a writable
|
||||
* file descriptor here?
|
||||
*/
|
||||
if ((flag & FWRITE) == 0)
|
||||
error = EBADF;
|
||||
else
|
||||
error = VOP_IOCTL(sc->sc_parent->dk_rawvp,
|
||||
cmd, data, flag,
|
||||
error = VOP_IOCTL(sc->sc_parent->dk_rawvp, cmd, data, flag,
|
||||
l != NULL ? l->l_cred : NOCRED);
|
||||
break;
|
||||
case DIOCGWEDGEINFO:
|
||||
|
|
Loading…
Reference in New Issue