qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 3/6] scsi-generic: allow customization of th


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [RFC PATCH 3/6] scsi-generic: allow customization of the lun
Date: Fri, 27 May 2011 15:04:23 +0200
User-agent: Mutt/1.5.17 (2007-11-01)

On Wed, May 25, 2011 at 05:20:59PM +0200, Paolo Bonzini wrote:
> I agree.  This case of INQUIRY is needed because (for simplicity and 
> backwards compatibility) you can hang a scsi-disk or scsi-generic device 
> directly off the HBA, without the intermediate pseudo-device that handles 
> dispatching commands and reporting LUNs.  In this case, the scsi-disk and 
> scsi-generic devices see requests for other LUN than theirs.  In the case 
> of INQUIRY and REQUEST SENSE, they must reply too.

Requiring this code in the scsi drivers is a really bad idea.  Not only
does it mean duplicating the implementation of REPORT LUNS and the illegal
LUN version of INQUIRY in every scsi LUN handler and the target driver,
but also an inconsitent topology of the qemu-internal objects representing
the SCSI implementation, which is a pretty clear path to all kinds of nast
bugs only showing up for the legacy case some time down the road.

The right way to solve this is to make sure we always have the proper
target object by creating it under the hood for the legacy case.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]