From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KilkI-00058u-59 for qemu-devel@nongnu.org; Thu, 25 Sep 2008 03:58:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KilkG-00056p-82 for qemu-devel@nongnu.org; Thu, 25 Sep 2008 03:58:41 -0400 Received: from [199.232.76.173] (port=33532 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KilkF-00056d-Ss for qemu-devel@nongnu.org; Thu, 25 Sep 2008 03:58:40 -0400 Received: from mx20.gnu.org ([199.232.41.8]:23537) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KilkF-00023u-TP for qemu-devel@nongnu.org; Thu, 25 Sep 2008 03:58:40 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KilkE-0005x7-Kz for qemu-devel@nongnu.org; Thu, 25 Sep 2008 03:58:38 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m8P7wFBI010129 for ; Thu, 25 Sep 2008 03:58:15 -0400 Message-ID: <48DB4519.6040902@redhat.com> Date: Thu, 25 Sep 2008 11:00:25 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH]: fix QEMU SCSI lock up References: <20080924225946.GA28588@dmt.cnet> <48DACF6F.40301@us.ibm.com> In-Reply-To: <48DACF6F.40301@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 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: qemu-devel@nongnu.org Cc: Marcelo Tosatti Anthony Liguori wrote: >> >> For reasons that I do not fully understand, bdrv_aio_read() does >> not return immediately, but instead it calls scsi_read_data() >> recursively. > > This bothers me. bdrv_aio_read() should never immediately invoke the > callback to prevent exactly this sort of problem. Perhaps this was a > bug that has since been fixed? Is this still reproducible? qcow2 metadata is synchronous, and if the disk is empty, there will be no data I/O, so bdrv_aio_read() will never be invoked. Maybe we should fix this in qcow2 (and the other block formats) by scheduling a BH. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.