]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/raid/raid1.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / include / linux / raid / raid1.h
index 60e19b667548feccf6d8dd5cac96ab0c3420c3a5..9d5494aaac0f532e993c0a823b963a1dbf989e55 100644 (file)
@@ -45,6 +45,8 @@ struct r1_private_data_s {
 
        spinlock_t              resync_lock;
        int                     nr_pending;
+       int                     nr_waiting;
+       int                     nr_queued;
        int                     barrier;
        sector_t                next_resync;
        int                     fullsync;  /* set to 1 if a full sync is needed,
@@ -52,11 +54,12 @@ struct r1_private_data_s {
                                            * Cleared when a sync completes.
                                            */
 
-       wait_queue_head_t       wait_idle;
-       wait_queue_head_t       wait_resume;
+       wait_queue_head_t       wait_barrier;
 
        struct pool_info        *poolinfo;
 
+       struct page             *tmppage;
+
        mempool_t *r1bio_pool;
        mempool_t *r1buf_pool;
 };
@@ -106,11 +109,20 @@ struct r1bio_s {
        /* DO NOT PUT ANY NEW FIELDS HERE - bios array is contiguously alloced*/
 };
 
+/* when we get a read error on a read-only array, we redirect to another
+ * device without failing the first device, or trying to over-write to
+ * correct the read error.  To keep track of bad blocks on a per-bio
+ * level, we store IO_BLOCKED in the appropriate 'bios' pointer
+ */
+#define IO_BLOCKED ((struct bio*)1)
+
 /* bits for r1bio.state */
 #define        R1BIO_Uptodate  0
 #define        R1BIO_IsSync    1
 #define        R1BIO_Degraded  2
-#define        R1BIO_BehindIO   3
+#define        R1BIO_BehindIO  3
+#define        R1BIO_Barrier   4
+#define R1BIO_BarrierRetry 5
 /* For write-behind requests, we call bi_end_io when
  * the last non-write-behind device completes, providing
  * any write was successful.  Otherwise we call when