From: Anthony Liguori <anthony@codemonkey.ws>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] scsi: Make device scsi-disk reject /dev/sg*
Date: Tue, 09 Mar 2010 09:01:12 -0600 [thread overview]
Message-ID: <4B9662B8.5070605@codemonkey.ws> (raw)
In-Reply-To: <m3iq9lvcjr.fsf@blackfin.pond.sub.org>
On 02/25/2010 04:23 AM, Markus Armbruster wrote:
> You're supposed to use scsi-generic for that. Which rejects anything
> but /dev/sg*.
>
> Signed-off-by: Markus Armbruster<armbru@redhat.com>
> ---
>
Applied. Thanks.
Regards,
Anthony Liguori
> hw/scsi-disk.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
> index b2f61fe..ad8eb24 100644
> --- a/hw/scsi-disk.c
> +++ b/hw/scsi-disk.c
> @@ -1027,6 +1027,11 @@ static int scsi_disk_initfn(SCSIDevice *dev)
> }
> s->bs = s->qdev.conf.dinfo->bdrv;
>
> + if (bdrv_is_sg(s->bs)) {
> + qemu_error("scsi-disk: unwanted /dev/sg*\n");
> + return -1;
> + }
> +
> if (bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM) {
> s->cluster_size = 4;
> } else {
>
prev parent reply other threads:[~2010-03-09 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 10:23 [Qemu-devel] [PATCH] scsi: Make device scsi-disk reject /dev/sg* Markus Armbruster
2010-02-25 11:19 ` [Qemu-devel] " Gerd Hoffmann
2010-02-25 11:58 ` Markus Armbruster
2010-02-28 1:45 ` Paul Brook
2010-03-01 8:13 ` Gerd Hoffmann
2010-02-25 11:47 ` Michael S. Tsirkin
2010-03-09 15:01 ` Anthony Liguori [this message]
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=4B9662B8.5070605@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=kraxel@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).