]> err.no Git - linux-2.6/blobdiff - include/linux/raid/raid5.h
Pull novell-bugzilla-156426 into release branch
[linux-2.6] / include / linux / raid / raid5.h
index b7b2653af7bb06e898a728266810b7c216ee836b..914af667044f6f39eaf0a9ef51e6fa1966b44175 100644 (file)
@@ -135,6 +135,7 @@ struct stripe_head {
        atomic_t                count;                  /* nr of active thread/requests */
        spinlock_t              lock;
        int                     bm_seq; /* sequence number for bitmap flushes */
+       int                     disks;                  /* disks in stripe */
        struct r5dev {
                struct bio      req;
                struct bio_vec  vec;
@@ -156,6 +157,7 @@ struct stripe_head {
 #define        R5_ReadError    8       /* seen a read error here recently */
 #define        R5_ReWrite      9       /* have tried to over-write the readerror */
 
+#define        R5_Expanded     10      /* This block now has post-expand data */
 /*
  * Write method
  */
@@ -174,7 +176,9 @@ struct stripe_head {
 #define        STRIPE_DELAYED          6
 #define        STRIPE_DEGRADED         7
 #define        STRIPE_BIT_DELAY        8
-
+#define        STRIPE_EXPANDING        9
+#define        STRIPE_EXPAND_SOURCE    10
+#define        STRIPE_EXPAND_READY     11
 /*
  * Plugging:
  *
@@ -211,11 +215,19 @@ struct raid5_private_data {
        int                     raid_disks, working_disks, failed_disks;
        int                     max_nr_stripes;
 
+       /* used during an expand */
+       sector_t                expand_progress;        /* MaxSector when no expand happening */
+       sector_t                expand_lo; /* from here up to expand_progress it out-of-bounds
+                                           * as we haven't flushed the metadata yet
+                                           */
+       int                     previous_raid_disks;
+
        struct list_head        handle_list; /* stripes needing handling */
        struct list_head        delayed_list; /* stripes that have plugged requests */
        struct list_head        bitmap_list; /* stripes delaying awaiting bitmap update */
        atomic_t                preread_active_stripes; /* stripes with scheduled io */
 
+       atomic_t                reshape_stripes; /* stripes with pending writes for reshape */
        /* unfortunately we need two cache names as we temporarily have
         * two caches.
         */