Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26389
b: refs/heads/master
c: 62de608
h: refs/heads/master
i:
  26387: 77d39ba
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed May 2, 2006
1 parent 6541cc5 commit 4c97f2d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bea2771871ed1084c9a85ed0c86340f188505702
refs/heads/master: 62de608da0b0ab17d81a233b50d1e952b9816f69
16 changes: 11 additions & 5 deletions trunk/drivers/md/raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,18 +753,24 @@ static int make_request(request_queue_t *q, struct bio * bio)
const int rw = bio_data_dir(bio);
int do_barriers;

if (unlikely(!mddev->barriers_work && bio_barrier(bio))) {
bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
return 0;
}

/*
* Register the new request and wait if the reconstruction
* thread has put up a bar for new requests.
* Continue immediately if no resync is active currently.
* We test barriers_work *after* md_write_start as md_write_start
* may cause the first superblock write, and that will check out
* if barriers work.
*/

md_write_start(mddev, bio); /* wait on superblock update early */

if (unlikely(!mddev->barriers_work && bio_barrier(bio))) {
if (rw == WRITE)
md_write_end(mddev);
bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
return 0;
}

wait_barrier(conf);

disk_stat_inc(mddev->gendisk, ios[rw]);
Expand Down

0 comments on commit 4c97f2d

Please sign in to comment.