scsi: Report error when lun number is in use
PATCH 1/1 scsi: Report error when lun number is in use
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.
--- hw/scsi/scsi-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/scsi/scsi-bus.c +2 -1
@@ -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; } }
Signature · 1 line
2.0.0
Il 10/06/2014 08:55, Fam Zheng ha scritto:
Quoted 14 lines
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 <[email protected]>--- hw/scsi/scsi-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/scsi/scsi-bus.c +0
-0
hw/scsi/scsi-bus.c static int scsi_qdev_init(DeviceState *qdev) · line 184
Quoted 9 lines
hw/scsi/scsi-bus.c +2
-1@@ -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
Quoted 18 lines · Paolo Bonzini
Il 10/06/2014 08:55, Fam Zheng ha scritto:
Quoted 17 lines
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 <[email protected]>---
hw/scsi/scsi-bus.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)hw/scsi/scsi-bus.c +0
-1@@ -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));
Quoted 8 lines
hw/scsi/scsi-bus.c static int scsi_qdev_init(DeviceState *qdev) · line 184
Quoted 6 lines
hw/scsi/scsi-bus.c +2
-0+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
Quoted 4 lines · Fam Zheng
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 <[email protected]>
Do we want this in 2.1?
Fam
Quoted 22 lines
--- hw/scsi/scsi-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)hw/scsi/scsi-bus.c +2
-1@@ -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; } }Signature · 1 line
2.0.0
Il 14/07/2014 04:42, Fam Zheng ha scritto:
Quoted 9 lines · Fam Zheng
Quoted 4 lines
Quoted 4 lines
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 <[email protected]>Do we want this in 2.1?
Fam
Yes, thanks!
Paolo