From patchwork Wed May 4 13:41:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Arcangeli X-Patchwork-Id: 94041 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E53D9B6FC9 for ; Wed, 4 May 2011 23:41:40 +1000 (EST) Received: from localhost ([::1]:43754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHcKe-00080K-RQ for incoming@patchwork.ozlabs.org; Wed, 04 May 2011 09:41:36 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHcKT-0007zo-42 for qemu-devel@nongnu.org; Wed, 04 May 2011 09:41:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHcKS-0000Xc-65 for qemu-devel@nongnu.org; Wed, 04 May 2011 09:41:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHcKR-0000XQ-Rw for qemu-devel@nongnu.org; Wed, 04 May 2011 09:41:24 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p44DfKAd016367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 4 May 2011 09:41:20 -0400 Received: from random.random (ovpn-113-95.phx2.redhat.com [10.3.113.95]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p44DfJUT026327; Wed, 4 May 2011 09:41:20 -0400 Date: Wed, 4 May 2011 15:41:19 +0200 From: Andrea Arcangeli To: Kevin Wolf Message-ID: <20110504134119.GG7838@random.random> References: <20110503200339.GA7838@random.random> <4DC1096C.6040806@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4DC1096C.6040806@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org, Christoph Hellwig Subject: Re: [Qemu-devel] [PATCH] ide: cleanup warnings X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Wed, May 04, 2011 at 10:08:12AM +0200, Kevin Wolf wrote: > Isn't it a bug that qemu_aio_flush() doesn't clear aiocb/status? Should > we move the ide_set_inactive() call from ide_dma_error to ide_dma_cb? How would that make a difference, it's still running in aio context, running it a bit earlier won't move the needle? I think it's more likely an error path currently not covered by ide_set_inactive that may have to be covered. It doesn't seem fatal but I tend to agree if we can make that warning go away without putting it under #ifdef like usptream, we should do that too. Maybe something like this will make it go away? diff --git a/hw/ide/core.c b/hw/ide/core.c index 90f553b..b81f1d7 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -377,6 +377,7 @@ void ide_set_sector(IDEState *s, int64_t sector_num) static void ide_rw_error(IDEState *s) { ide_abort_command(s); + ide_set_inactive(s); ide_set_irq(s->bus); }