From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nm0lW-0003Xy-GD for qemu-devel@nongnu.org; Mon, 01 Mar 2010 03:14:10 -0500 Received: from [199.232.76.173] (port=60925 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nm0lV-0003Xd-0G for qemu-devel@nongnu.org; Mon, 01 Mar 2010 03:14:09 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nm0lU-0002bA-E0 for qemu-devel@nongnu.org; Mon, 01 Mar 2010 03:14:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52855) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nm0lU-0002b5-1A for qemu-devel@nongnu.org; Mon, 01 Mar 2010 03:14:08 -0500 Message-ID: <4B8B7741.7060707@redhat.com> Date: Mon, 01 Mar 2010 09:13:53 +0100 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] scsi: Make device scsi-disk reject /dev/sg* References: <4B865CA8.4010505@redhat.com> <201002280145.38065.paul@codesourcery.com> In-Reply-To: <201002280145.38065.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, Markus Armbruster 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