NetBSD Problem Report #39008

From apb@cequrux.com  Sat Jun 21 16:28:18 2008
Return-Path: <apb@cequrux.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 384DB63B880
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 21 Jun 2008 16:28:18 +0000 (UTC)
Message-Id: <20080621162319.B422AE9307C@apb-laptoy.apb.alt.za>
Date: Sat, 21 Jun 2008 16:23:19 +0000 (UTC)
From: apb@cequrux.com
To: gnats-bugs@gnats.NetBSD.org
Subject: not al disks support DIOCGSTRATEGY/DIOCSSTRATEGY
X-Send-Pr-Version: 3.95

>Number:         39008
>Category:       kern
>Synopsis:       not al disks support DIOCGSTRATEGY/DIOCSSTRATEGY
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 21 16:30:00 +0000 2008
>Originator:     Alan Barrett
>Release:        NetBSD 4.99.63
>Organization:
Not much
>Environment:
System: NetBSD 4.99.63
Architecture: i386
Machine: i386
>Description:
	Not all disk devices support the DIOCGSTRATEGY and
	DIOCSSTRATEGY ioctls.
>How-To-Repeat:
	# dkctl wd0 strategy
	/dev/rwd0d: priocscan
	# dkctl cgd1 strategy
	/dev/rcgd1d: priocscan
	# dkctl sd0 strategy
	dkctl: /dev/rsd0d: DIOCGSTRATEGY: Inappropriate ioctl for device
>Fix:
	There seem to be several almost-identical implementations
	of the disk I/O strategy ioctls, in sys/dev/dksubr.c,
	sys/dev/ld.c, and sys/dev/ata/wd.c.  There's an implementation
	in sys/dev/scsipi/cd.c that always returns EIO.  There are
	implementations in sys/arch/xen/xbd.c and xbd_xenbus.c that
	return EOPNOTSUPP.

	It apears that the wd driver uses its own implementation, the
	cgd driver falls back to the implementation in dksubr.c, and the
	sd driver neitehr provides its own implementaiotn nor falls back
	to the shared implementation in dksub.c.

	I think that it would make sense for the relevant code to be
	shared by all disk drivers.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.