Skip to contentSkip to conversation

new barrier warnings in 2.6.29-rc1

DISCUSSION Christoph Hellwig 3 participants 7 messages Jan 12, 2009 – Jan 19, 2009 Block layer

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

(cc'ing Jens)
Hello,

Quoted 6 lines · Christoph Hellwig

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
Quoted 7 lines

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.

Signature · 1 line
tejun
#2 lore raw
Quoted 16 lines · Tejun Heo

(cc'ing Jens)
Hello,

Quoted 12 lines · Christoph Hellwig

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:

Quoted 4 lines
Quoted 1 line
[ 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?

block/blk-core.c +5 -0
index a824e49..eddba4a 100644
@@ -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);
Signature · 1 line
Jens Axboe
#3 lore raw

Hello, Jens.

Quoted 15 lines · Jens Axboe
Quoted 2 lines · Tejun Heo

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?

block/blk-core.c +0 -0
index a824e49..eddba4a 100644
@@ -1448,6 +1448,11 @@ static inline void __generic_make_request(struct bio *bio)
 			err = -EOPNOTSUPP;

block/blk-core.c static inline void __generic_make_request(struct bio *bio) · line 1458

Quoted 10 lines
block/blk-core.c +5 -0
 			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.

Signature · 1 line
tejun
#4 lore raw
Quoted 26 lines · Tejun Heo

Hello, Jens.

Quoted 23 lines · Jens Axboe
Quoted 2 lines · Tejun Heo

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?

block/blk-core.c +5 -0
index a824e49..eddba4a 100644
@@ -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;
+		}
 
Quoted 5 lines

block/blk-core.c static inline void __generic_make_request(struct bio *bio) · line 1458

Quoted 2 lines
block/blk-core.c +0 -0
 		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?

Signature · 1 line
Jens Axboe
#6 lore raw
Quoted 2 lines · Christoph Hellwig

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.

Signature · 1 line
Jens Axboe