Skip to content

Commit

Permalink
block: silently error unsupported empty barriers too
Browse files Browse the repository at this point in the history
With 2.6.32-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 52b1fd5
  Author: Mikulas Patocka <[email protected]>
    dm: send empty barriers to targets in dm_flush

We should silently 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 <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Acked-by: Alasdair G Kergon <[email protected]>
Acked-by: Mikulas Patocka <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
markmc authored and Jens Axboe committed Oct 24, 2009
1 parent d995053 commit 6cafb12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ static int __make_request(struct request_queue *q, struct bio *bio)
const unsigned int ff = bio->bi_rw & REQ_FAILFAST_MASK;
int rw_flags;

if (bio_rw_flagged(bio, BIO_RW_BARRIER) && bio_has_data(bio) &&
if (bio_rw_flagged(bio, BIO_RW_BARRIER) &&
(q->next_ordered == QUEUE_ORDERED_NONE)) {
bio_endio(bio, -EOPNOTSUPP);
return 0;
Expand Down

0 comments on commit 6cafb12

Please sign in to comment.