From patchwork Mon Oct 12 10:27:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 35745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 6C25FB7B76 for ; Mon, 12 Oct 2009 21:28:04 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1MxI8E-00067P-Oy; Mon, 12 Oct 2009 11:27:58 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1MxI84-00066S-1S for kernel-team@lists.ubuntu.com; Mon, 12 Oct 2009 11:27:48 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1MxI84-0007kR-0g for ; Mon, 12 Oct 2009 11:27:48 +0100 Received: from 79-66-201-85.dynamic.dsl.as9105.com ([79.66.201.85] helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MxI83-00058q-TQ for kernel-team@lists.ubuntu.com; Mon, 12 Oct 2009 11:27:48 +0100 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: [Upstream] block: silently error unsupported empty barriers too Date: Mon, 12 Oct 2009 11:27:46 +0100 Message-Id: <1255343266-9476-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.6.3.rc3.199.g24398 In-Reply-To: <1255343266-9476-1-git-send-email-apw@canonical.com> References: <1255343266-9476-1-git-send-email-apw@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.8 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com BugLink: http://bugs.launchpad.net/bugs/420423 Patch: http://patchwork.kernel.org/patch/39589/ With 2.6.31-rc5 in a KVM guest using dm and virtio_blk, we see the following errors: end_request: I/O error, dev vda, sector 0 end_request: I/O error, dev vda, sector 0 The errors go away if dm stops submitting empty barriers, by reverting: commit 52b1fd5a27c625c78373e024bf570af3c9d44a79 Author: Mikulas Patocka dm: send empty barriers to targets in dm_flush We should error all barriers, even empty barriers, on devices like virtio_blk which don't support them. See also: https://bugzilla.redhat.com/514901 Signed-off-by: Mark McLoughlin Cc: Rusty Russell Cc: Mikulas Patocka Cc: Alasdair G Kergon Cc: Neil Brown Signed-off-by: Andy Whitcroft Acked-by: Stefan Bader --- block/blk-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index e3299a7..af20cbd 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1163,7 +1163,7 @@ static int __make_request(struct request_queue *q, struct bio *bio) const int unplug = bio_unplug(bio); int rw_flags; - if (bio_barrier(bio) && bio_has_data(bio) && + if (bio_barrier(bio) && (q->next_ordered == QUEUE_ORDERED_NONE)) { bio_endio(bio, -EOPNOTSUPP); return 0;