rpms/kernel/devel linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch, NONE, 1.1 kernel.spec, 1.1698, 1.1699

jforbes jforbes at fedoraproject.org
Thu Aug 6 19:37:29 UTC 2009


Author: jforbes

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19349

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch 
Log Message:
Fix kvm virtio_blk errors (bz #514901)

linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch:
 blk-core.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- NEW FILE linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch ---
From: Mark McLoughlin <markmc at redhat.com>
Subject: [PATCH] block: silently error unsupported empty barriers too

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 <mpatocka at redhat.com>
    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 <markmc at redhat.com>
Cc: Rusty Russell <rusty at rustcorp.com.au>
Cc: Mikulas Patocka <mpatocka at redhat.com>
Cc: Alasdair G Kergon <agk at redhat.com>
Cc: Neil Brown <neilb at suse.de>
---
 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;
 	}
-- 
1.6.4



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1698
retrieving revision 1.1699
diff -u -p -r1.1698 -r1.1699
--- kernel.spec	6 Aug 2009 18:48:09 -0000	1.1698
+++ kernel.spec	6 Aug 2009 19:37:29 -0000	1.1699
@@ -711,6 +711,7 @@ Patch11010: via-hwmon-temp-sensor.patch
 
 # patches headed upstream
 Patch12010: linux-2.6-dell-laptop-rfkill-fix.patch
+Patch12011: linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch
 
 %endif
 
@@ -1279,6 +1280,9 @@ ApplyPatch linux-2.6-ksm.patch
 # Optimize KVM for KSM support
 ApplyPatch linux-2.6-ksm-kvm.patch
 
+# Fix block I/O errors in KVM
+ApplyPatch linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch
+
 ApplyPatch linux-2.6-e1000-ich9.patch
 
 # Nouveau DRM + drm fixes
@@ -1953,6 +1957,9 @@ fi
 # and build.
 
 %changelog
+* Thu Aug 06 2009 Justin M. Forbes <jforbes at redhat.com>
+- Fix kvm virtio_blk errors (#514901)
+
 * Thu Aug 06 2009 Adam Jackson <ajax at redhat.com>
 - Hush DRM vblank warnings, they're constant (and harmless) under DRI2.
 




More information about the fedora-extras-commits mailing list