qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH] scsi: Make device scsi-disk reject /dev/sg*


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Re: [PATCH] scsi: Make device scsi-disk reject /dev/sg*
Date: Mon, 01 Mar 2010 09:13:53 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1

On 02/28/10 02:45, Paul Brook wrote:
On 02/25/10 11:23, Markus Armbruster wrote:
You're supposed to use scsi-generic for that.  Which rejects anything
but /dev/sg*.

Well, it isn't *that* easy.  The SG_IO ioctl used by scsi-generic works
on tons of devices in linux, not only /dev/sg*.  I've seen patches
floading around which change the check bdrv_is_sg() into "try SG_IO and
see if it works", which would allow to use /dev/sda with both scsi-disk
and scsi-generic depending on what you want.  Which makes alot of sense.

Making that change needs some extra care though to avoid existing
configurations switching from scsi-disk to scsi-generic unnoticed.

Don't we really want to be testing !bdrv_is_block() ?

That would work for linux.  Dunno about the BSD.

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]