From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JhNwI-0003ho-NW for qemu-devel@nongnu.org; Thu, 03 Apr 2008 07:49:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JhNwG-0003gj-KR for qemu-devel@nongnu.org; Thu, 03 Apr 2008 07:49:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhNwG-0003gd-CW for qemu-devel@nongnu.org; Thu, 03 Apr 2008 07:49:04 -0400 Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194] helo=il.qumranet.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JhNwG-00066o-3M for qemu-devel@nongnu.org; Thu, 03 Apr 2008 07:49:04 -0400 Message-ID: <47F4C42E.3050301@qumranet.com> Date: Thu, 03 Apr 2008 14:49:02 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] QEMU/KVM SCSI lock up References: <87k5jfixcb.fsf@fftw.org> <47F49770.1010906@qumranet.com> <87d4p7i3tx.fsf@fftw.org> In-Reply-To: <87d4p7i3tx.fsf@fftw.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Matteo Frigo Cc: qemu-devel@nongnu.org Matteo Frigo wrote: > 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 misread the patch, sorry. >> 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(). Yes, scsi_read_complete() calls s->completion, which triggers the recursion, by my reading. -- error compiling committee.c: too many arguments to function