From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [Qemu-devel] [PATCH 2/5] scsi-disk: report resized disk via sense codes Date: Tue, 17 Jul 2012 13:15:58 +0200 Message-ID: <5005496E.5090305@redhat.com> References: <1342448756-7582-1-git-send-email-pbonzini@redhat.com> <1342448756-7582-3-git-send-email-pbonzini@redhat.com> <50054904.4040301@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: Kevin Wolf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40188 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751944Ab2GQLQC (ORCPT ); Tue, 17 Jul 2012 07:16:02 -0400 In-Reply-To: <50054904.4040301@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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