[Qemu-devel] [PATCH 0/2] scsi: enclosure support

Hannes Reinecke posted 2 patches 6 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1501766821-76419-1-git-send-email-hare@suse.de
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
hw/scsi/scsi-bus.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 72 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH 0/2] scsi: enclosure support
Posted by Hannes Reinecke 6 years, 7 months ago
Hi all,

due to a customer issue I've added simple subenclosure support
to the SCSI emulation. The patch simply converts the current invisible
LUN0 into an enclosure device; existing setups using LUN0 as disks or
CD-ROMs will not be affected.

Hannes Reinecke (2):
  scsi: Make LUN 0 a simple enclosure
  scsi: use qemu_uuid to generate logical identifier for SES

 hw/scsi/scsi-bus.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 72 insertions(+), 1 deletion(-)

-- 
1.8.5.6


Re: [Qemu-devel] [PATCH 0/2] scsi: enclosure support
Posted by Paolo Bonzini 6 years, 7 months ago
On 03/08/2017 15:26, Hannes Reinecke wrote:
> Hi all,
> 
> due to a customer issue I've added simple subenclosure support
> to the SCSI emulation. The patch simply converts the current invisible
> LUN0 into an enclosure device; existing setups using LUN0 as disks or
> CD-ROMs will not be affected.

What is the issue exactly?  That is, for what is it necessary to have a
dummy enclosure?

I agree with Dan that this need machine type compatibility gunk.  For
example, could the new device affect /dev/sgN numbering?

Paolo

Re: [Qemu-devel] [PATCH 0/2] scsi: enclosure support
Posted by Hannes Reinecke 6 years, 7 months ago
On 08/03/2017 05:10 PM, Paolo Bonzini wrote:
> On 03/08/2017 15:26, Hannes Reinecke wrote:
>> Hi all,
>>
>> due to a customer issue I've added simple subenclosure support
>> to the SCSI emulation. The patch simply converts the current invisible
>> LUN0 into an enclosure device; existing setups using LUN0 as disks or
>> CD-ROMs will not be affected.
> 
> What is the issue exactly?  That is, for what is it necessary to have a
> dummy enclosure?
> 
Well, stock linux displays some very interesting error messages for
these types of enclosures.
Which was the prime mover for doing this.

> I agree with Dan that this need machine type compatibility gunk.  For
> example, could the new device affect /dev/sgN numbering?
> 
Yes, indeed it would.

What about a new option to the scsi driver?
With that each user could selectively enable it, and we wouldn't need to
worry with machine type compability...

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Re: [Qemu-devel] [PATCH 0/2] scsi: enclosure support
Posted by Paolo Bonzini 6 years, 7 months ago
> On 08/03/2017 05:10 PM, Paolo Bonzini wrote:
> > On 03/08/2017 15:26, Hannes Reinecke wrote:
> >> Hi all,
> >>
> >> due to a customer issue I've added simple subenclosure support
> >> to the SCSI emulation. The patch simply converts the current invisible
> >> LUN0 into an enclosure device; existing setups using LUN0 as disks or
> >> CD-ROMs will not be affected.
> > 
> > What is the issue exactly?  That is, for what is it necessary to have a
> > dummy enclosure?
> > 
> Well, stock linux displays some very interesting error messages for
> these types of enclosures. Which was the prime mover for doing this.

--verbose?

> > I agree with Dan that this need machine type compatibility gunk.  For
> > example, could the new device affect /dev/sgN numbering?
>
> Yes, indeed it would.
> 
> What about a new option to the scsi driver?

If you do that, you've done 99% of the work to do compatibility so I
won't complain and do the 1% myself. :)

Paolo

Re: [Qemu-devel] [PATCH 0/2] scsi: enclosure support
Posted by Hannes Reinecke 6 years, 7 months ago
On 08/04/2017 08:10 AM, Paolo Bonzini wrote:
> 
>> On 08/03/2017 05:10 PM, Paolo Bonzini wrote:
>>> On 03/08/2017 15:26, Hannes Reinecke wrote:
>>>> Hi all,
>>>>
>>>> due to a customer issue I've added simple subenclosure support
>>>> to the SCSI emulation. The patch simply converts the current invisible
>>>> LUN0 into an enclosure device; existing setups using LUN0 as disks or
>>>> CD-ROMs will not be affected.
>>>
>>> What is the issue exactly?  That is, for what is it necessary to have a
>>> dummy enclosure?
>>>
>> Well, stock linux displays some very interesting error messages for
>> these types of enclosures. Which was the prime mover for doing this.
> 
> --verbose?
> 
[   12.958454] scsi 1:0:0:254: Wrong diagnostic page; asked for 2 got 0
[   12.958456] scsi 1:0:0:254: Failed to get diagnostic page 0xffffffea
[   12.958457] scsi 1:0:0:254: Failed to bind enclosure -19
[   12.959392] ses 1:0:0:254: Attached Enclosure device

>>> I agree with Dan that this need machine type compatibility gunk.  For
>>> example, could the new device affect /dev/sgN numbering?
>>
>> Yes, indeed it would.
>>
>> What about a new option to the scsi driver?
> 
> If you do that, you've done 99% of the work to do compatibility so I
> won't complain and do the 1% myself. :)
> 
Okay, will be doing so.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)