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: Wed, 25 May 2011 15:10:49 +0200
User-agent: Mutt/1.5.17 (2007-11-01)

On Fri, May 20, 2011 at 05:03:34PM +0200, Paolo Bonzini wrote:
> This allows passthrough of devices with LUN != 0, by redirecting them to
> LUN0 in the emulated target.

I'm not quite sure what this code is for.  Each /dev/sg device reresents
a LUN.  So if we want to suport multiple LUNs in qemu for devices that
are backed by scsi-generic devices we need to take REPORT_LUNs emulation
into the core scsi code, as any qemu target is completely independent
of the underlying scsi device topology.  In fact we could easily
mix generic and scsi-disk LUNs on a single target.

> +    case INQUIRY:
> +        if (req->lun != s->lun) {

This seems odd.  I'd expect the SCSI core to handle the LUN addressing.
For now that is just rejecting wrongs ones, and if multiple LUN
support is added dispatching it to the correct drivers instance.




reply via email to

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