From patchwork Thu Sep 3 15:47:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark McLoughlin X-Patchwork-Id: 45389 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n83Fmsxo006088 for ; Thu, 3 Sep 2009 15:48:54 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 9ABFD61A421; Thu, 3 Sep 2009 11:48:53 -0400 (EDT) Received: from int-mx05.intmail.prod.int.phx2.redhat.com (nat-pool.util.phx.redhat.com [10.8.5.200]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n83Fmn1Z014255 for ; Thu, 3 Sep 2009 11:48:49 -0400 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n83FmkWA027086; Thu, 3 Sep 2009 11:48:46 -0400 From: Mark McLoughlin To: Jens Axboe Date: Thu, 03 Sep 2009 16:47:50 +0100 Message-Id: <1251992870.3084.125.camel@blaa> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-loop: dm-devel@redhat.com Cc: Rusty Russell , linux-kernel , virtualization , Christoph Hellwig , dm-devel , Mikulas Patocka , Alasdair Kergon Subject: [dm-devel] [PATCH resend] block: silently error unsupported empty barriers too X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: Mark McLoughlin , device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com 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 Cc: Christoph Hellwig --- block/blk-core.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index e3299a7..35ad2bb 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1163,8 +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) && - (q->next_ordered == QUEUE_ORDERED_NONE)) { + if (bio_barrier(bio) && (q->next_ordered == QUEUE_ORDERED_NONE)) { bio_endio(bio, -EOPNOTSUPP); return 0; }