From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr5l8-0007mf-Dy for qemu-devel@nongnu.org; Tue, 17 Jul 2012 07:16:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sr5l4-00020H-Cp for qemu-devel@nongnu.org; Tue, 17 Jul 2012 07:16:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr5l4-000209-5J for qemu-devel@nongnu.org; Tue, 17 Jul 2012 07:16:02 -0400 Message-ID: <5005496E.5090305@redhat.com> Date: Tue, 17 Jul 2012 13:15:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1342448756-7582-1-git-send-email-pbonzini@redhat.com> <1342448756-7582-3-git-send-email-pbonzini@redhat.com> <50054904.4040301@redhat.com> In-Reply-To: <50054904.4040301@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/5] scsi-disk: report resized disk via sense codes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Il 17/07/2012 13:14, Kevin Wolf ha scritto: >> > - if (s->features & (1 << SCSI_DISK_F_REMOVABLE)) { >> > - bdrv_set_dev_ops(s->qdev.conf.bs, &scsi_cd_block_ops, s); >> > - } >> > + bdrv_set_dev_ops(s->qdev.conf.bs, &scsi_disk_block_ops, s); > Are you aware of this code? > > bool bdrv_dev_has_removable_media(BlockDriverState *bs) > { > return !bs->dev || (bs->dev_ops && bs->dev_ops->change_media_cb); > } > > This means that now all SCSI disks have removable media from the > monitor's point of view. I remembered there was something similar but I couldn't find it. I'll rework the patch to have two separate sets of dev_ops. Thanks very much! Paolo