|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v3 13/21] scsi: do not call send_command directly |
Date: | Tue, 24 May 2011 15:13:13 +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.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 05/24/2011 03:05 PM, Kevin Wolf wrote:
Maybe the callback should be done from a BH then? It sounds like this could cause more bugs than what you're fixing here.
Not sure, after all it makes sense to answer some queries synchronously (e.g. TEST_UNIT_READY). It's just the convoluted control flow that tricked you when you moved accesses to after the request has been completed. With reference counting, the data in the SCSIRequest remains completely valid after it has been completed and until the last ref goes away, so I see no reason to complicate the logic further by introducing a BH.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |