public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* new barrier warnings in 2.6.29-rc1
@ 2009-01-12 15:46 Christoph Hellwig
  2009-01-13  3:23 ` Tejun Heo
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2009-01-12 15:46 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel

Whever a filesystem submits a bio with the barrier flag set but
the underlying hardware doesn't support it we now get errors in
the form of:

[ 3046.442629] end_request: I/O error, dev vdb, sector 0

since commit a7384677b2f4cd40948fd7ce024ba5e1821444ba which removed
the early check on the queue capabilities in __make_request.  I
think this message is pretty annoying and confusing for the user
as the filesystems already have more descriptive warnings, e.g. for
XFS:

[ 3046.455478] Filesystem "vdb": Disabling barriers, trial barrier write failed

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: new barrier warnings in 2.6.29-rc1
  2009-01-12 15:46 new barrier warnings in 2.6.29-rc1 Christoph Hellwig
@ 2009-01-13  3:23 ` Tejun Heo
  2009-01-13  8:42   ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2009-01-13  3:23 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-kernel, Jens Axboe

(cc'ing Jens)
Hello,

Christoph Hellwig wrote:
> Whever a filesystem submits a bio with the barrier flag set but
> the underlying hardware doesn't support it we now get errors in
> the form of:
> 
> [ 3046.442629] end_request: I/O error, dev vdb, sector 0
> 
> since commit a7384677b2f4cd40948fd7ce024ba5e1821444ba which removed
> the early check on the queue capabilities in __make_request.  I
> think this message is pretty annoying and confusing for the user
> as the filesystems already have more descriptive warnings, e.g. for
> XFS:
> 
> [ 3046.455478] Filesystem "vdb": Disabling barriers, trial barrier write failed

I think the right thing to do is setting REQ_QUIET on the trial
barrier request.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: new barrier warnings in 2.6.29-rc1
  2009-01-13  3:23 ` Tejun Heo
@ 2009-01-13  8:42   ` Jens Axboe
  2009-01-13 10:40     ` Tejun Heo
  2009-01-18 22:15     ` Christoph Hellwig
  0 siblings, 2 replies; 7+ messages in thread
From: Jens Axboe @ 2009-01-13  8:42 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Christoph Hellwig, linux-kernel

On Tue, Jan 13 2009, Tejun Heo wrote:
> (cc'ing Jens)
> Hello,
> 
> Christoph Hellwig wrote:
> > Whever a filesystem submits a bio with the barrier flag set but
> > the underlying hardware doesn't support it we now get errors in
> > the form of:
> > 
> > [ 3046.442629] end_request: I/O error, dev vdb, sector 0
> > 
> > since commit a7384677b2f4cd40948fd7ce024ba5e1821444ba which removed
> > the early check on the queue capabilities in __make_request.  I
> > think this message is pretty annoying and confusing for the user
> > as the filesystems already have more descriptive warnings, e.g. for
> > XFS:
> > 
> > [ 3046.455478] Filesystem "vdb": Disabling barriers, trial barrier write failed
> 
> I think the right thing to do is setting REQ_QUIET on the trial
> barrier request.

It would surely work, but XFS doesn't really have a way to do that. Then
we would have to add a bio quiet flag and inherit that.

I kind of liked the old behaviour. What about something like the below?

diff --git a/block/blk-core.c b/block/blk-core.c
index a824e49..eddba4a 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1448,6 +1448,11 @@ static inline void __generic_make_request(struct bio *bio)
 			err = -EOPNOTSUPP;
 			goto end_io;
 		}
+		if (bio_barrier(bio) && bio_has_data(bio) &&
+		    (q->next_ordered == QUEUE_ORDERED_NONE)) {
+			err = -EOPNOTSUPP;
+			goto end_io;
+		}
 
 		ret = q->make_request_fn(q, bio);
 	} while (ret);

-- 
Jens Axboe


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: new barrier warnings in 2.6.29-rc1
  2009-01-13  8:42   ` Jens Axboe
@ 2009-01-13 10:40     ` Tejun Heo
  2009-01-13 10:45       ` Jens Axboe
  2009-01-18 22:15     ` Christoph Hellwig
  1 sibling, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2009-01-13 10:40 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, linux-kernel

Hello, Jens.

Jens Axboe wrote:
> On Tue, Jan 13 2009, Tejun Heo wrote:
>> I think the right thing to do is setting REQ_QUIET on the trial
>> barrier request.
> 
> It would surely work, but XFS doesn't really have a way to do that. Then
> we would have to add a bio quiet flag and inherit that.
> 
> I kind of liked the old behaviour. What about something like the below?
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index a824e49..eddba4a 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -1448,6 +1448,11 @@ static inline void __generic_make_request(struct bio *bio)
>  			err = -EOPNOTSUPP;
>  			goto end_io;
>  		}
> +		if (bio_barrier(bio) && bio_has_data(bio) &&
> +		    (q->next_ordered == QUEUE_ORDERED_NONE)) {
> +			err = -EOPNOTSUPP;
> +			goto end_io;
> +		}
>  
>  		ret = q->make_request_fn(q, bio);
>  	} while (ret);

I have no objection against it.  I kind of like having single test
point but it's a corner case anyway so no biggie.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: new barrier warnings in 2.6.29-rc1
  2009-01-13 10:40     ` Tejun Heo
@ 2009-01-13 10:45       ` Jens Axboe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2009-01-13 10:45 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Christoph Hellwig, linux-kernel

On Tue, Jan 13 2009, Tejun Heo wrote:
> Hello, Jens.
> 
> Jens Axboe wrote:
> > On Tue, Jan 13 2009, Tejun Heo wrote:
> >> I think the right thing to do is setting REQ_QUIET on the trial
> >> barrier request.
> > 
> > It would surely work, but XFS doesn't really have a way to do that. Then
> > we would have to add a bio quiet flag and inherit that.
> > 
> > I kind of liked the old behaviour. What about something like the below?
> > 
> > diff --git a/block/blk-core.c b/block/blk-core.c
> > index a824e49..eddba4a 100644
> > --- a/block/blk-core.c
> > +++ b/block/blk-core.c
> > @@ -1448,6 +1448,11 @@ static inline void __generic_make_request(struct bio *bio)
> >  			err = -EOPNOTSUPP;
> >  			goto end_io;
> >  		}
> > +		if (bio_barrier(bio) && bio_has_data(bio) &&
> > +		    (q->next_ordered == QUEUE_ORDERED_NONE)) {
> > +			err = -EOPNOTSUPP;
> > +			goto end_io;
> > +		}
> >  
> >  		ret = q->make_request_fn(q, bio);
> >  	} while (ret);
> 
> I have no objection against it.  I kind of like having single test
> point but it's a corner case anyway so no biggie.

I agree, but it's a lot better than having to fiddle around with every
spot that wants to do a barrier probe. I'll merge it up for 2.6.29.
Christoph, can you double check that it gets rid of your warning and
still catches the barrier disable?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: new barrier warnings in 2.6.29-rc1
  2009-01-13  8:42   ` Jens Axboe
  2009-01-13 10:40     ` Tejun Heo
@ 2009-01-18 22:15     ` Christoph Hellwig
  2009-01-19 20:19       ` Jens Axboe
  1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2009-01-18 22:15 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Tejun Heo, Christoph Hellwig, linux-kernel

I still see the warnings with Jens' patch, but now only one instead of
two per mount.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: new barrier warnings in 2.6.29-rc1
  2009-01-18 22:15     ` Christoph Hellwig
@ 2009-01-19 20:19       ` Jens Axboe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2009-01-19 20:19 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Tejun Heo, linux-kernel

On Sun, Jan 18 2009, Christoph Hellwig wrote:
> I still see the warnings with Jens' patch, but now only one instead of
> two per mount.

Hmm weird, I'll run and fix it locally.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-19 20:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 15:46 new barrier warnings in 2.6.29-rc1 Christoph Hellwig
2009-01-13  3:23 ` Tejun Heo
2009-01-13  8:42   ` Jens Axboe
2009-01-13 10:40     ` Tejun Heo
2009-01-13 10:45       ` Jens Axboe
2009-01-18 22:15     ` Christoph Hellwig
2009-01-19 20:19       ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox