* [Qemu-devel] [PATCH] scsi: Report error when lun number is in use
@ 2014-06-10 6:55 Fam Zheng
2014-06-10 8:18 ` Paolo Bonzini
2014-07-14 2:42 ` Fam Zheng
0 siblings, 2 replies; 5+ messages in thread
From: Fam Zheng @ 2014-06-10 6:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, stefanha
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>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] scsi: Report error when lun number is in use
2014-06-10 6:55 [Qemu-devel] [PATCH] scsi: Report error when lun number is in use Fam Zheng
@ 2014-06-10 8:18 ` Paolo Bonzini
2014-06-11 6:14 ` Fam Zheng
2014-07-14 2:42 ` Fam Zheng
1 sibling, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2014-06-10 8:18 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: stefanha
Il 10/06/2014 08:55, Fam Zheng ha scritto:
> 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>
> ---
> 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;
> }
> }
>
>
Thanks, applying. Would you look into converting the SCSI bus to realize?
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] scsi: Report error when lun number is in use
2014-06-10 8:18 ` Paolo Bonzini
@ 2014-06-11 6:14 ` Fam Zheng
0 siblings, 0 replies; 5+ messages in thread
From: Fam Zheng @ 2014-06-11 6:14 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, stefanha
On Tue, 06/10 10:18, Paolo Bonzini wrote:
> Il 10/06/2014 08:55, Fam Zheng ha scritto:
> >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>
> >---
> > 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;
> > }
> > }
> >
> >
>
> Thanks, applying. Would you look into converting the SCSI bus to realize?
OK, will look into it!
Thanks,
Fam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] scsi: Report error when lun number is in use
2014-06-10 6:55 [Qemu-devel] [PATCH] scsi: Report error when lun number is in use Fam Zheng
2014-06-10 8:18 ` Paolo Bonzini
@ 2014-07-14 2:42 ` Fam Zheng
2014-07-14 6:43 ` Paolo Bonzini
1 sibling, 1 reply; 5+ messages in thread
From: Fam Zheng @ 2014-07-14 2:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, stefanha
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 <famz@redhat.com>
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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] scsi: Report error when lun number is in use
2014-07-14 2:42 ` Fam Zheng
@ 2014-07-14 6:43 ` Paolo Bonzini
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-07-14 6:43 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: stefanha
Il 14/07/2014 04:42, Fam Zheng ha scritto:
> 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 <famz@redhat.com>
> Do we want this in 2.1?
>
> Fam
>
Yes, thanks!
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-14 6:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-10 6:55 [Qemu-devel] [PATCH] scsi: Report error when lun number is in use Fam Zheng
2014-06-10 8:18 ` Paolo Bonzini
2014-06-11 6:14 ` Fam Zheng
2014-07-14 2:42 ` Fam Zheng
2014-07-14 6:43 ` Paolo Bonzini
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).