From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6WDT-0002vc-Qu for qemu-devel@nongnu.org; Sun, 13 Jul 2014 22:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6WDN-0002F5-Cq for qemu-devel@nongnu.org; Sun, 13 Jul 2014 22:42:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6WDN-0002DP-4o for qemu-devel@nongnu.org; Sun, 13 Jul 2014 22:42:05 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6E2g3QO017475 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 13 Jul 2014 22:42:03 -0400 Date: Mon, 14 Jul 2014 10:42:22 +0800 From: Fam Zheng Message-ID: <20140714024222.GA12498@T430.redhat.com> References: <1402383358-24079-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1402383358-24079-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH] scsi: Report error when lun number is in use List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , stefanha@redhat.com On Tue, 06/10 14:55, Fam Zheng wrote: > 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 Do we want this in 2.1? Fam > --- > 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 06399fa..d219da3 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; > } > } > > -- > 2.0.0 > >