From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Fam Zheng <famz@redhat.com>
Subject: [Qemu-devel] [PULL 1/5] scsi: Report error when lun number is in use
Date: Mon, 14 Jul 2014 17:49:24 +0200 [thread overview]
Message-ID: <1405352968-3155-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1405352968-3155-1-git-send-email-pbonzini@redhat.com>
From: Fam Zheng <famz@redhat.com>
In the case that the lun number is taken by another scsi device, don't
release the existing device siliently, but report an error to user.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/scsi-bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index ea1ac09..4341754 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -177,7 +177,8 @@ static int scsi_qdev_init(DeviceState *qdev)
d = scsi_device_find(bus, dev->channel, dev->id, dev->lun);
assert(d);
if (d->lun == dev->lun && dev != d) {
- object_unparent(OBJECT(d));
+ error_report("lun already used by '%s'", d->qdev.id);
+ goto err;
}
}
--
1.9.3
next prev parent reply other threads:[~2014-07-14 15:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 15:49 [Qemu-devel] [PULL for-2.1 0/5] Serial + SCSI fixes for 2014-07-14 Paolo Bonzini
2014-07-14 15:49 ` Paolo Bonzini [this message]
2014-07-14 15:49 ` [Qemu-devel] [PULL 2/5] qemu-char: fix deadlock with "-monitor pty" Paolo Bonzini
2014-07-14 15:49 ` [Qemu-devel] [PULL 3/5] serial: change retry logic to avoid concurrency Paolo Bonzini
2014-07-24 12:57 ` Pavel Hrdina
2014-07-24 14:10 ` Paolo Bonzini
2014-07-14 15:49 ` [Qemu-devel] [PULL 4/5] virtio-scsi: fix with -M pc-i440fx-2.0 Paolo Bonzini
2014-07-14 15:49 ` [Qemu-devel] [PULL 5/5] serial-pci: remove memory regions from BAR before destroying them Paolo Bonzini
2014-07-15 13:14 ` [Qemu-devel] [PULL for-2.1 0/5] Serial + SCSI fixes for 2014-07-14 Peter Maydell
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=1405352968-3155-2-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@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).