From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JhNTB-00005A-BE for qemu-devel@nongnu.org; Thu, 03 Apr 2008 07:19:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JhNT9-0008VN-59 for qemu-devel@nongnu.org; Thu, 03 Apr 2008 07:19:00 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhNT8-0008VE-LM for qemu-devel@nongnu.org; Thu, 03 Apr 2008 07:18:58 -0400 Received: from fftw.vpsland.com ([69.61.62.151] helo=fftw.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JhNT8-0005x6-JE for qemu-devel@nongnu.org; Thu, 03 Apr 2008 07:18:58 -0400 Subject: Re: [Qemu-devel] QEMU/KVM SCSI lock up References: <87k5jfixcb.fsf@fftw.org> <47F49770.1010906@qumranet.com> From: Matteo Frigo Date: Thu, 03 Apr 2008 07:18:50 -0400 In-Reply-To: <47F49770.1010906@qumranet.com> (Avi Kivity's message of "Thu\, 03 Apr 2008 11\:38\:08 +0300") Message-ID: <87d4p7i3tx.fsf@fftw.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org Avi Kivity writes: > Will that not issue the read for the wrong sector? The patch that I submitted issues the read for the correct sector: It reads (r->sector - n) instead of r->sector. I apologize if my explanation of the patch was confusing on this point. > I think the correct fix is to move r->sector and r->sector_count > adjustment into scsi_read_complete() and scsi_write_complete(). This will work as long as you can guarantee that scsi_read_complete() is called before the recursive call to scsi_read_data(). Regards, Matteo Frigo