From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48188 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgErA-0004F6-LK for qemu-devel@nongnu.org; Fri, 21 Jan 2011 06:08:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgEr8-0006aV-Dp for qemu-devel@nongnu.org; Fri, 21 Jan 2011 06:08:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgEr8-0006aD-6w for qemu-devel@nongnu.org; Fri, 21 Jan 2011 06:08:38 -0500 Message-ID: <4D396987.7070903@redhat.com> Date: Fri, 21 Jan 2011 12:09:59 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 1/3] scsi-disk: Allow overriding SCSI INQUIRY removable bit References: <1295345442-16218-1-git-send-email-stefanha@linux.vnet.ibm.com> <1295345442-16218-2-git-send-email-stefanha@linux.vnet.ibm.com> <4D357C0D.5070802@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Christoph Hellwig , "Justin M. Forbes" , Stefan Hajnoczi Am 21.01.2011 11:45, schrieb Stefan Hajnoczi: > On Tue, Jan 18, 2011 at 12:06 PM, Stefan Hajnoczi wrote: >> On Tue, Jan 18, 2011 at 11:39 AM, Kevin Wolf wrote: >>> Am 18.01.2011 11:10, schrieb Stefan Hajnoczi: >>>> Provide the "removable" qdev property bit to override the SCSI INQUIRY >>>> removable (RMB) bit for non-CDROM devices. This will be used by USB >>>> Mass Storage Devices, which sometimes have this guest-visible bit set >>>> and sometimes do not. They therefore requires a means for user >>>> configuration. >>>> >>>> Signed-off-by: Stefan Hajnoczi >>> >>> Should we print an error message when the user tries to make a CD-ROM >>> non-removable instead of silently ignoring the option? >> >> Good point. I will add a check in scsi_disk_initfn() for v3. > > Actually this case is hard to check against. The removable property > is a boolean that defaults to false. We can't detect the difference > between default, cleared, or set. Hm, I see... Maybe we should make scsi-disk and scsi-cdrom different devices in the long run, then scsi-cdrom could default to true (or rather not have the property at all). > I'm sending out a new version of the patch series that updates > docs/qdev-device-use.txt to describe how the removable property works. Okay, let's just document how it works. Kevin