|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 2/3] scsi: replace 'tag' with 'hba_private' pointer |
Date: | Fri, 01 Jul 2011 16:33:14 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 07/01/2011 03:11 PM, Hannes Reinecke wrote:
On 07/01/2011 10:27 AM, Paolo Bonzini wrote:On 07/01/2011 09:42 AM, Hannes Reinecke wrote:'tag' is just an abstraction to identify the command from the driver. So we should make that explicit by replacing 'tag' with a driver-defined pointer 'hba_private'. This saves the lookup for driver handling several commands in parallel.This makes tracing a bit harder to follow. Perhaps you can keep the transport tag (a uint64_t) in the SCSIRequest for debugging purposes?Hmm. The transport tag wouldn't have any meaning outside scsi-bus.c.
It depends, in vmw_pvscsi I take it from a field in the request block that is 0..255. So either you have a small tag that is recycled but stays nice, or a large tag that is unwieldy but should not be recycled ever. A pointer is unwieldy _and_ is recycled, so it gives the worse of both worlds.
But I'm not very attached to this, I may even do it myself if/when I find the need. Won't ack yet because of the nit with ESP/USB, but even if you do not bother I will ack the next respin.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |