Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154245
b: refs/heads/master
c: 5aa2781
h: refs/heads/master
i:
  154243: 703d722
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Jun 22, 2009
1 parent 5c684d9 commit 39a2bbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: 2761e95fe40ca0d01864310fa4d488d7c5e34e18
refs/heads/master: 5aa2781d964e9835c441932110484bc454b5c207
17 changes: 9 additions & 8 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ static void dec_pending(struct dm_io *io, int error)
* a per-device variable for error reporting.
* Note that you can't touch the bio after end_io_acct
*/
md->barrier_error = io_error;
if (!md->barrier_error)
md->barrier_error = io_error;
end_io_acct(io);
} else {
end_io_acct(io);
Expand Down Expand Up @@ -867,7 +868,8 @@ static void __split_and_process_bio(struct mapped_device *md, struct bio *bio)
if (!bio_barrier(bio))
bio_io_error(bio);
else
md->barrier_error = -EIO;
if (!md->barrier_error)
md->barrier_error = -EIO;
return;
}

Expand Down Expand Up @@ -1448,16 +1450,15 @@ static void dm_flush(struct mapped_device *md)

static void process_barrier(struct mapped_device *md, struct bio *bio)
{
md->barrier_error = 0;

dm_flush(md);

if (bio_empty_barrier(bio)) {
bio_endio(bio, 0);
return;
if (!bio_empty_barrier(bio)) {
__split_and_process_bio(md, bio);
dm_flush(md);
}

__split_and_process_bio(md, bio);
dm_flush(md);

if (md->barrier_error != DM_ENDIO_REQUEUE)
bio_endio(bio, md->barrier_error);
else {
Expand Down

0 comments on commit 39a2bbc

Please sign in to comment.