* [PATCH resend] block: silently error unsupported empty barriers too
@ 2009-09-03 15:47 Mark McLoughlin
2009-10-15 0:23 ` Alasdair G Kergon
2009-10-23 20:40 ` Mike Snitzer
0 siblings, 2 replies; 4+ messages in thread
From: Mark McLoughlin @ 2009-09-03 15:47 UTC (permalink / raw)
To: Jens Axboe
Cc: Rusty Russell, linux-kernel, virtualization, Christoph Hellwig,
dm-devel, Mikulas Patocka, Alasdair Kergon
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@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@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH resend] block: silently error unsupported empty barriers too 2009-09-03 15:47 [PATCH resend] block: silently error unsupported empty barriers too Mark McLoughlin @ 2009-10-15 0:23 ` Alasdair G Kergon 2009-10-15 19:11 ` Mikulas Patocka 2009-10-23 20:40 ` Mike Snitzer 1 sibling, 1 reply; 4+ messages in thread From: Alasdair G Kergon @ 2009-10-15 0:23 UTC (permalink / raw) To: Jens Axboe Cc: Mark McLoughlin, Rusty Russell, linux-kernel, virtualization, Christoph Hellwig, device-mapper development, Mikulas Patocka On Thu, Sep 03, 2009 at 04:47:50PM +0100, Mark McLoughlin wrote: > We should error all barriers, even empty barriers, on devices like > virtio_blk which don't support them. Acked-by: Alasdair G Kergon <agk@redhat.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH resend] block: silently error unsupported empty barriers too 2009-10-15 0:23 ` Alasdair G Kergon @ 2009-10-15 19:11 ` Mikulas Patocka 0 siblings, 0 replies; 4+ messages in thread From: Mikulas Patocka @ 2009-10-15 19:11 UTC (permalink / raw) To: Alasdair G Kergon Cc: Mark McLoughlin, Rusty Russell, linux-kernel, virtualization, Christoph Hellwig, device-mapper development, Jens Axboe On Thu, 15 Oct 2009, Alasdair G Kergon wrote: > On Thu, Sep 03, 2009 at 04:47:50PM +0100, Mark McLoughlin wrote: > > We should error all barriers, even empty barriers, on devices like > > virtio_blk which don't support them. > > Acked-by: Alasdair G Kergon <agk@redhat.com> Acked-by: Mikulas Patocka <mpatocka@redhat.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH resend] block: silently error unsupported empty barriers too 2009-09-03 15:47 [PATCH resend] block: silently error unsupported empty barriers too Mark McLoughlin 2009-10-15 0:23 ` Alasdair G Kergon @ 2009-10-23 20:40 ` Mike Snitzer 1 sibling, 0 replies; 4+ messages in thread From: Mike Snitzer @ 2009-10-23 20:40 UTC (permalink / raw) To: Jens Axboe, Rusty Russell, device-mapper development Cc: Mark McLoughlin, linux-kernel, virtualization, Christoph Hellwig, Mikulas Patocka, Alasdair Kergon On Thu, Sep 03 2009 at 11:47am -0400, Mark McLoughlin <markmc@redhat.com> wrote: > 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@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@redhat.com> > Cc: Rusty Russell <rusty@rustcorp.com.au> > Cc: Mikulas Patocka <mpatocka@redhat.com> > Cc: Alasdair G Kergon <agk@redhat.com> > Cc: Neil Brown <neilb@suse.de> > Cc: Christoph Hellwig <hch@infradead.org> > --- > 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; > } Jens, Any chance we can get this fix upstream for 2.6.32? I refreshed the patch to work on 2.6.32-rc5: From: Mark McLoughlin <markmc@redhat.com> 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 52b1fd5a27c625c78373e024bf570af3c9d44a79 Author: Mikulas Patocka <mpatocka@redhat.com> 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 <markmc@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Alasdair G Kergon <agk@redhat.com> Acked-by: Mikulas Patocka <mpatocka@redhat.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Neil Brown <neilb@suse.de> Cc: Christoph Hellwig <hch@infradead.org> --- 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 ac0fa10..71da511 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -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; ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-23 20:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-09-03 15:47 [PATCH resend] block: silently error unsupported empty barriers too Mark McLoughlin 2009-10-15 0:23 ` Alasdair G Kergon 2009-10-15 19:11 ` Mikulas Patocka 2009-10-23 20:40 ` Mike Snitzer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox