qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/6] scsi-disk: Check for supported commands


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [PATCH 6/6] scsi-disk: Check for supported commands
Date: Tue, 26 Jul 2011 15:20:31 +0200
User-agent: Mutt/1.5.17 (2007-11-01)

On Fri, Jul 22, 2011 at 04:51:17PM +0200, Hannes Reinecke wrote:
> Not every command is support for any device type. This patch adds
> a check for rejecting unsupported commands.
> 
> Signed-off-by: Hannes Reinecke <address@hidden>

This seems to conflic with Markus' series.  But if we want to invest
any major effort into it, we really need to different dispatch tables
for different device types.  There's two sane ways to do it:

one top-level handler with a switch per device type, or tables
with a handler pointer with a device type.  I'm fine with either one.

What I really don't get with this patch is the listing of all the different
SCSI device types.  It's already a mistake that we tried to handle disks
and CDROMs with the same driver, but adding even more just makes it worth.

IMHO we should simply have one file per SCSI spec, e.g. an spc.c for the
common bits, then an sbc.c for disks, and mmc.c for cdroms.  Maybe more
the day we add more emulated device types.




reply via email to

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