git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dm raid1: do not allow log_failure variable to unset after being set
[safe/jmp/linux-2.6]
/
drivers
/
md
/
dm-raid1.c
diff --git
a/drivers/md/dm-raid1.c
b/drivers/md/dm-raid1.c
index
9726577
..
33f179e
100644
(file)
--- a/
drivers/md/dm-raid1.c
+++ b/
drivers/md/dm-raid1.c
@@
-648,7
+648,13
@@
static void do_writes(struct mirror_set *ms, struct bio_list *writes)
*/
dm_rh_inc_pending(ms->rh, &sync);
dm_rh_inc_pending(ms->rh, &nosync);
*/
dm_rh_inc_pending(ms->rh, &sync);
dm_rh_inc_pending(ms->rh, &nosync);
- ms->log_failure = dm_rh_flush(ms->rh) ? 1 : 0;
+
+ /*
+ * If the flush fails on a previous call and succeeds here,
+ * we must not reset the log_failure variable. We need
+ * userspace interaction to do that.
+ */
+ ms->log_failure = dm_rh_flush(ms->rh) ? 1 : ms->log_failure;
/*
* Dispatch io.
/*
* Dispatch io.