i2c: Get rid of struct i2c_client_address_data
[safe/jmp/linux-2.6] / drivers / md / dm-raid1.c
index 42a3e43..cc9dc79 100644 (file)
@@ -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);
-       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.
@@ -1123,7 +1129,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio,
        if (error == -EOPNOTSUPP)
                goto out;
 
-       if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))
+       if ((error == -EWOULDBLOCK) && bio_rw_flagged(bio, BIO_RW_AHEAD))
                goto out;
 
        if (unlikely(error)) {
@@ -1293,7 +1299,7 @@ static int mirror_iterate_devices(struct dm_target *ti,
 
        for (i = 0; !ret && i < ms->nr_mirrors; i++)
                ret = fn(ti, ms->mirror[i].dev,
-                        ms->mirror[i].offset, data);
+                        ms->mirror[i].offset, ti->len, data);
 
        return ret;
 }