Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154243
b: refs/heads/master
c: 531fe96
h: refs/heads/master
i:
  154241: 180eb29
  154239: f0a9820
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Jun 22, 2009
1 parent 1503784 commit 703d722
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 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: 32a926da5a16c01a8213331e5764472ce2f14a8d
refs/heads/master: 531fe96364f30879753d46c1f52ab839e12d2e5d
17 changes: 4 additions & 13 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,34 +1439,25 @@ static int dm_wait_for_completion(struct mapped_device *md, int interruptible)
return r;
}

static int dm_flush(struct mapped_device *md)
static void dm_flush(struct mapped_device *md)
{
dm_wait_for_completion(md, TASK_UNINTERRUPTIBLE);
return 0;
}

static void process_barrier(struct mapped_device *md, struct bio *bio)
{
int error = dm_flush(md);
dm_flush(md);

if (unlikely(error)) {
bio_endio(bio, error);
return;
}
if (bio_empty_barrier(bio)) {
bio_endio(bio, 0);
return;
}

__split_and_process_bio(md, bio);

error = dm_flush(md);

if (!error && md->barrier_error)
error = md->barrier_error;
dm_flush(md);

if (md->barrier_error != DM_ENDIO_REQUEUE)
bio_endio(bio, error);
bio_endio(bio, md->barrier_error);
}

/*
Expand Down

0 comments on commit 703d722

Please sign in to comment.