linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / linux / raid / md_k.h
index d288902..617b950 100644 (file)
@@ -40,8 +40,7 @@ typedef struct mdk_rdev_s mdk_rdev_t;
  * options passed in raidrun:
  */
 
-/* Currently this must fix in an 'int' */
-#define MAX_CHUNK_SIZE (1<<30)
+#define MAX_CHUNK_SIZE (4096*1024)
 
 /*
  * MD's 'extended' device
@@ -58,7 +57,6 @@ struct mdk_rdev_s
 
        struct page     *sb_page;
        int             sb_loaded;
-       __u64           sb_events;
        sector_t        data_offset;    /* start of data in array */
        sector_t        sb_offset;
        int             sb_size;        /* bytes in the superblock */
@@ -89,10 +87,6 @@ struct mdk_rdev_s
                                         * array and could again if we did a partial
                                         * resync from the bitmap
                                         */
-       sector_t        recovery_offset;/* If this device has been partially
-                                        * recovered, this is where we were
-                                        * up to.
-                                        */
 
        atomic_t        nr_pending;     /* number of pending requests.
                                         * only maintained for arrays that
@@ -138,30 +132,17 @@ struct mddev_s
 
        char                            uuid[16];
 
-       /* If the array is being reshaped, we need to record the
-        * new shape and an indication of where we are up to.
-        * This is written to the superblock.
-        * If reshape_position is MaxSector, then no reshape is happening (yet).
-        */
-       sector_t                        reshape_position;
-       int                             delta_disks, new_level, new_layout, new_chunk;
-
        struct mdk_thread_s             *thread;        /* management thread */
        struct mdk_thread_s             *sync_thread;   /* doing resync or reconstruct */
-       sector_t                        curr_resync;    /* last block scheduled */
+       sector_t                        curr_resync;    /* blocks scheduled */
        unsigned long                   resync_mark;    /* a recent timestamp */
        sector_t                        resync_mark_cnt;/* blocks written at resync_mark */
-       sector_t                        curr_mark_cnt; /* blocks scheduled now */
 
        sector_t                        resync_max_sectors; /* may be set by personality */
 
        sector_t                        resync_mismatches; /* count of sectors where
                                                            * parity/replica mismatch found
                                                            */
-
-       /* allow user-space to request suspension of IO to regions of the array */
-       sector_t                        suspend_lo;
-       sector_t                        suspend_hi;
        /* if zero, use the system-wide default */
        int                             sync_speed_min;
        int                             sync_speed_max;
@@ -176,9 +157,6 @@ struct mddev_s
         * DONE:     thread is done and is waiting to be reaped
         * REQUEST:  user-space has requested a sync (used with SYNC)
         * CHECK:    user-space request for for check-only, no repair
-        * RESHAPE:  A reshape is happening
-        *
-        * If neither SYNC or RESHAPE are set, then it is a recovery.
         */
 #define        MD_RECOVERY_RUNNING     0
 #define        MD_RECOVERY_SYNC        1
@@ -188,13 +166,10 @@ struct mddev_s
 #define        MD_RECOVERY_NEEDED      5
 #define        MD_RECOVERY_REQUESTED   6
 #define        MD_RECOVERY_CHECK       7
-#define MD_RECOVERY_RESHAPE    8
-#define        MD_RECOVERY_FROZEN      9
-
        unsigned long                   recovery;
 
        int                             in_sync;        /* know to not need resync */
-       struct mutex                    reconfig_mutex;
+       struct semaphore                reconfig_sem;
        atomic_t                        active;
 
        int                             changed;        /* true if we might need to reread partition info */
@@ -274,8 +249,7 @@ struct mdk_personality
        int (*spare_active) (mddev_t *mddev);
        sector_t (*sync_request)(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster);
        int (*resize) (mddev_t *mddev, sector_t sectors);
-       int (*check_reshape) (mddev_t *mddev);
-       int (*start_reshape) (mddev_t *mddev);
+       int (*reshape) (mddev_t *mddev, int raid_disks);
        int (*reconfig) (mddev_t *mddev, int layout, int chunk_size);
        /* quiesce moves between quiescence states
         * 0 - fully active