Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59289
b: refs/heads/master
c: fc1ff95
h: refs/heads/master
i:
  59287: 0bc08d0
v: v3
  • Loading branch information
Jonathan Brassow authored and Linus Torvalds committed Jul 12, 2007
1 parent 17136f1 commit 8b69eca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: f44db678edcc6f4c2779ac43f63f0b9dfa28b724
refs/heads/master: fc1ff9588a6d56258ff9576a31aa34f17757c666
12 changes: 8 additions & 4 deletions trunk/drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ struct mirror_set {
/* recovery */
region_t nr_regions;
int in_sync;
int log_failure;

struct mirror *default_mirror; /* Default mirror */

Expand Down Expand Up @@ -589,9 +590,9 @@ static void rh_recovery_end(struct region *reg, int success)
wake(rh->ms);
}

static void rh_flush(struct region_hash *rh)
static int rh_flush(struct region_hash *rh)
{
rh->log->type->flush(rh->log);
return rh->log->type->flush(rh->log);
}

static void rh_delay(struct region_hash *rh, struct bio *bio)
Expand Down Expand Up @@ -892,12 +893,15 @@ static void do_writes(struct mirror_set *ms, struct bio_list *writes)
*/
rh_inc_pending(&ms->rh, &sync);
rh_inc_pending(&ms->rh, &nosync);
rh_flush(&ms->rh);
ms->log_failure = rh_flush(&ms->rh) ? 1 : 0;

/*
* Dispatch io.
*/
while ((bio = bio_list_pop(&sync)))
if (unlikely(ms->log_failure))
while ((bio = bio_list_pop(&sync)))
bio_endio(bio, bio->bi_size, -EIO);
else while ((bio = bio_list_pop(&sync)))
do_write(ms, bio);

while ((bio = bio_list_pop(&recover)))
Expand Down

0 comments on commit 8b69eca

Please sign in to comment.