Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkcMF-000742-BQ for qemu-devel@nongnu.org; Thu, 25 Feb 2010 06:58:19 -0500 Received: from [199.232.76.173] (port=59075 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkcME-00073p-T2 for qemu-devel@nongnu.org; Thu, 25 Feb 2010 06:58:18 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkcMD-00016w-Kh for qemu-devel@nongnu.org; Thu, 25 Feb 2010 06:58:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16100) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NkcMD-00016k-9z for qemu-devel@nongnu.org; Thu, 25 Feb 2010 06:58:17 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1PBwGY4016697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Feb 2010 06:58:16 -0500 From: Markus Armbruster References: <4B865CA8.4010505@redhat.com> Date: Thu, 25 Feb 2010 12:58:14 +0100 In-Reply-To: <4B865CA8.4010505@redhat.com> (Gerd Hoffmann's message of "Thu, 25 Feb 2010 12:19:04 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH] scsi: Make device scsi-disk reject /dev/sg* List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Gerd Hoffmann writes: > 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 Yes, the existing check in scsi-generic is pretty cheesy. My patch just makes scsi-disk consistently cheesy ;) > 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. Would be nice to have some day.