qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 2/5] scsi-disk: report resized disk via sense codes
Date: Tue, 17 Jul 2012 13:15:58 +0200	[thread overview]
Message-ID: <5005496E.5090305@redhat.com> (raw)
In-Reply-To: <50054904.4040301@redhat.com>

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

  reply	other threads:[~2012-07-17 11:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16 14:25 [Qemu-devel] [PATCH 0/5] virtio-scsi: support block_resize Paolo Bonzini
2012-07-16 14:25 ` [Qemu-devel] [PATCH 1/5] scsi-disk: removable hard disks support START/STOP Paolo Bonzini
2012-07-23 16:44   ` Blue Swirl
2012-07-23 16:50     ` Paolo Bonzini
2012-07-16 14:25 ` [Qemu-devel] [PATCH 2/5] scsi-disk: report resized disk via sense codes Paolo Bonzini
2012-07-17 11:14   ` Kevin Wolf
2012-07-17 11:15     ` Paolo Bonzini [this message]
2012-07-16 14:25 ` [Qemu-devel] [PATCH 3/5] scsi: establish precedence levels for unit attention Paolo Bonzini
2012-07-16 14:25 ` [Qemu-devel] [PATCH 4/5] scsi: report parameter changes to HBA drivers Paolo Bonzini
2012-07-16 14:25 ` [Qemu-devel] [PATCH 5/5] virtio-scsi: report parameter change events Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5005496E.5090305@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).