From patchwork Tue May 3 20:03:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Arcangeli X-Patchwork-Id: 93888 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 3620CB6F64 for ; Wed, 4 May 2011 06:03:58 +1000 (EST) Received: from localhost ([::1]:40770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHLp4-00029u-OT for incoming@patchwork.ozlabs.org; Tue, 03 May 2011 16:03:54 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHLow-00029n-QF for qemu-devel@nongnu.org; Tue, 03 May 2011 16:03:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHLov-0002YV-Lq for qemu-devel@nongnu.org; Tue, 03 May 2011 16:03:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHLov-0002YG-4q for qemu-devel@nongnu.org; Tue, 03 May 2011 16:03:45 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p43K3eNW006464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 3 May 2011 16:03:41 -0400 Received: from random.random (ovpn-113-95.phx2.redhat.com [10.3.113.95]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p43K3dtK030075; Tue, 3 May 2011 16:03:40 -0400 Date: Tue, 3 May 2011 22:03:39 +0200 From: Andrea Arcangeli To: qemu-devel@nongnu.org Message-ID: <20110503200339.GA7838@random.random> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Christoph Hellwig Subject: [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 Hello, This is just a minor cleanup adding \n. On a side note, it was good idea to keep it under DEBUG_IDE because if iscsi server reboots or goes down, this would generate a flood of errors if it's enabled (a flood of these warnings would have been shown with DEBUG_IDE on in such a condition). So I've also been wondering if it's safe to ignore these warnings when the iscsi server is down. The error is delivered up to ide which simulates a I/O error for the guest (something like BM_STATUS_PIO_RETRY), so then it should be up to the guest OS to retry long enough and deal with it without corrupting the guest filesystem image. Often local filesystems in the guest (ext4/brfs/xfs etc...) won't be heavily tested for I/O errors. So it would be somewhat safer to retry on the qemu side without passing errors up to the guest, OTOH the guest ide driver might eventually notice a DMA timeout if the I/O doesn't complete in a timely fashion, so retrying indefinitely in qemu aio layer wouldn't be a definitive solution to avoid triggering guest os bugs... So in the end this is probably the best way we can handle the iscsi server disconnect with ide. Maybe we can deal with iscsi server going down in a safer way by retrying in the host (transparently to the guest and unnoticed to the local fs in the guest) with virtio-blk as we have full control the guest driver (we don't control the guest ide driver instead)? OTOH that may lead to indefinite guest I/O hangs which may not be nice for the guest either if iscsi never returns up (though it would diminish the chance of triggering guest fs bugs in not well tested I/O error paths). === Subject: ide: cleanup warnings From: Andrea Arcangeli Add \n. Signed-off-by: Andrea Arcangeli --- hw/ide/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -298,9 +298,9 @@ void bmdma_cmd_writeb(void *opaque, uint qemu_aio_flush(); #ifdef DEBUG_IDE if (bm->bus->dma->aiocb) - printf("ide_dma_cancel: aiocb still pending"); + printf("ide_dma_cancel: aiocb still pending\n"); if (bm->status & BM_STATUS_DMAING) - printf("ide_dma_cancel: BM_STATUS_DMAING still pending"); + printf("ide_dma_cancel: BM_STATUS_DMAING still pending\n"); #endif } } else {