| 1 |
From: Mark McLoughlin <markmc@redhat.com>
|
| 2 |
Subject: [PATCH] block: silently error unsupported empty barriers too
|
| 3 |
|
| 4 |
With 2.6.31-rc5 in a KVM guest using dm and virtio_blk, we see the
|
| 5 |
following errors:
|
| 6 |
|
| 7 |
end_request: I/O error, dev vda, sector 0
|
| 8 |
end_request: I/O error, dev vda, sector 0
|
| 9 |
|
| 10 |
The errors go away if dm stops submitting empty barriers, by reverting:
|
| 11 |
|
| 12 |
commit 52b1fd5a27c625c78373e024bf570af3c9d44a79
|
| 13 |
Author: Mikulas Patocka <mpatocka@redhat.com>
|
| 14 |
dm: send empty barriers to targets in dm_flush
|
| 15 |
|
| 16 |
We should error all barriers, even empty barriers, on devices like
|
| 17 |
virtio_blk which don't support them.
|
| 18 |
|
| 19 |
See also:
|
| 20 |
|
| 21 |
https://bugzilla.redhat.com/514901
|
| 22 |
|
| 23 |
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
|
| 24 |
Cc: Rusty Russell <rusty@rustcorp.com.au>
|
| 25 |
Cc: Mikulas Patocka <mpatocka@redhat.com>
|
| 26 |
Cc: Alasdair G Kergon <agk@redhat.com>
|
| 27 |
Cc: Neil Brown <neilb@suse.de>
|
| 28 |
---
|
| 29 |
block/blk-core.c | 3 +--
|
| 30 |
1 files changed, 1 insertions(+), 2 deletions(-)
|
| 31 |
|
| 32 |
diff --git a/block/blk-core.c b/block/blk-core.c
|
| 33 |
index e3299a7..35ad2bb 100644
|
| 34 |
--- a/block/blk-core.c
|
| 35 |
+++ b/block/blk-core.c
|
| 36 |
@@ -1163,8 +1163,7 @@ static int __make_request(struct request_queue *q, struct bio *bio)
|
| 37 |
const int unplug = bio_unplug(bio);
|
| 38 |
int rw_flags;
|
| 39 |
|
| 40 |
- if (bio_barrier(bio) && bio_has_data(bio) &&
|
| 41 |
- (q->next_ordered == QUEUE_ORDERED_NONE)) {
|
| 42 |
+ if (bio_barrier(bio) && (q->next_ordered == QUEUE_ORDERED_NONE)) {
|
| 43 |
bio_endio(bio, -EOPNOTSUPP);
|
| 44 |
return 0;
|
| 45 |
}
|
| 46 |
--
|
| 47 |
1.6.4
|
| 48 |
|