raid10: change the size of resync window for clustered raid
[sfrench/cifs-2.6.git] / drivers / md / raid10.c
index c131835cf008c2df85e240259cac8182115e4e62..8d7ddc947d9d7ec6500bf7fd19e3077d3099b790 100644 (file)
@@ -141,7 +141,7 @@ static void r10bio_pool_free(void *r10_bio, void *data)
 #define RESYNC_WINDOW (1024*1024)
 /* maximum number of concurrent requests, memory permitting */
 #define RESYNC_DEPTH (32*1024*1024/RESYNC_BLOCK_SIZE)
-#define CLUSTER_RESYNC_WINDOW (16 * RESYNC_WINDOW)
+#define CLUSTER_RESYNC_WINDOW (32 * RESYNC_WINDOW)
 #define CLUSTER_RESYNC_WINDOW_SECTORS (CLUSTER_RESYNC_WINDOW >> 9)
 
 /*
@@ -900,6 +900,18 @@ static void flush_pending_writes(struct r10conf *conf)
                bio = bio_list_get(&conf->pending_bio_list);
                conf->pending_count = 0;
                spin_unlock_irq(&conf->device_lock);
+
+               /*
+                * As this is called in a wait_event() loop (see freeze_array),
+                * current->state might be TASK_UNINTERRUPTIBLE which will
+                * cause a warning when we prepare to wait again.  As it is
+                * rare that this path is taken, it is perfectly safe to force
+                * us to go around the wait_event() loop again, so the warning
+                * is a false-positive. Silence the warning by resetting
+                * thread state
+                */
+               __set_current_state(TASK_RUNNING);
+
                blk_start_plug(&plug);
                /* flush any pending bitmap writes to disk
                 * before proceeding w/ I/O */