NetBSD-Bugs archive

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

kern/39008: not al disks support DIOCGSTRATEGY/DIOCSSTRATEGY



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



Home | Main Index | Thread Index | Old Index