diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:18:49 -0500 |
| commit | e02a4cabfcb9a999b74a2e2e6f13ffcb7ff2d606 (patch) | |
| tree | 2f3db60be4c57eca2a4c3ab3f3122dcf1ec0c624 /include/linux/raid/md_k.h | |
| parent | 600511e86babe3727264a0883a3a264f6fb6caf5 (diff) | |
| parent | f3cab8a0b1a772dc8b055b7affa567a366627c9e (diff) | |
Merge branch 'master'
Diffstat (limited to 'include/linux/raid/md_k.h')
| -rw-r--r-- | include/linux/raid/md_k.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 617b9506c7..e2df61f5b0 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
| @@ -132,6 +132,14 @@ struct mddev_s | |||
| 132 | 132 | ||
| 133 | char uuid[16]; | 133 | char uuid[16]; |
| 134 | 134 | ||
| 135 | /* If the array is being reshaped, we need to record the | ||
| 136 | * new shape and an indication of where we are up to. | ||
| 137 | * This is written to the superblock. | ||
| 138 | * If reshape_position is MaxSector, then no reshape is happening (yet). | ||
| 139 | */ | ||
| 140 | sector_t reshape_position; | ||
| 141 | int delta_disks, new_level, new_layout, new_chunk; | ||
| 142 | |||
| 135 | struct mdk_thread_s *thread; /* management thread */ | 143 | struct mdk_thread_s *thread; /* management thread */ |
| 136 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ | 144 | struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */ |
| 137 | sector_t curr_resync; /* blocks scheduled */ | 145 | sector_t curr_resync; /* blocks scheduled */ |
| @@ -143,6 +151,10 @@ struct mddev_s | |||
| 143 | sector_t resync_mismatches; /* count of sectors where | 151 | sector_t resync_mismatches; /* count of sectors where |
| 144 | * parity/replica mismatch found | 152 | * parity/replica mismatch found |
| 145 | */ | 153 | */ |
| 154 | |||
| 155 | /* allow user-space to request suspension of IO to regions of the array */ | ||
| 156 | sector_t suspend_lo; | ||
| 157 | sector_t suspend_hi; | ||
| 146 | /* if zero, use the system-wide default */ | 158 | /* if zero, use the system-wide default */ |
| 147 | int sync_speed_min; | 159 | int sync_speed_min; |
| 148 | int sync_speed_max; | 160 | int sync_speed_max; |
| @@ -157,6 +169,9 @@ struct mddev_s | |||
| 157 | * DONE: thread is done and is waiting to be reaped | 169 | * DONE: thread is done and is waiting to be reaped |
| 158 | * REQUEST: user-space has requested a sync (used with SYNC) | 170 | * REQUEST: user-space has requested a sync (used with SYNC) |
| 159 | * CHECK: user-space request for for check-only, no repair | 171 | * CHECK: user-space request for for check-only, no repair |
| 172 | * RESHAPE: A reshape is happening | ||
| 173 | * | ||
| 174 | * If neither SYNC or RESHAPE are set, then it is a recovery. | ||
| 160 | */ | 175 | */ |
| 161 | #define MD_RECOVERY_RUNNING 0 | 176 | #define MD_RECOVERY_RUNNING 0 |
| 162 | #define MD_RECOVERY_SYNC 1 | 177 | #define MD_RECOVERY_SYNC 1 |
| @@ -166,10 +181,11 @@ struct mddev_s | |||
| 166 | #define MD_RECOVERY_NEEDED 5 | 181 | #define MD_RECOVERY_NEEDED 5 |
| 167 | #define MD_RECOVERY_REQUESTED 6 | 182 | #define MD_RECOVERY_REQUESTED 6 |
| 168 | #define MD_RECOVERY_CHECK 7 | 183 | #define MD_RECOVERY_CHECK 7 |
| 184 | #define MD_RECOVERY_RESHAPE 8 | ||
| 169 | unsigned long recovery; | 185 | unsigned long recovery; |
| 170 | 186 | ||
| 171 | int in_sync; /* know to not need resync */ | 187 | int in_sync; /* know to not need resync */ |
| 172 | struct semaphore reconfig_sem; | 188 | struct mutex reconfig_mutex; |
| 173 | atomic_t active; | 189 | atomic_t active; |
| 174 | 190 | ||
| 175 | int changed; /* true if we might need to reread partition info */ | 191 | int changed; /* true if we might need to reread partition info */ |
| @@ -249,7 +265,8 @@ struct mdk_personality | |||
| 249 | int (*spare_active) (mddev_t *mddev); | 265 | int (*spare_active) (mddev_t *mddev); |
| 250 | sector_t (*sync_request)(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster); | 266 | sector_t (*sync_request)(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster); |
| 251 | int (*resize) (mddev_t *mddev, sector_t sectors); | 267 | int (*resize) (mddev_t *mddev, sector_t sectors); |
| 252 | int (*reshape) (mddev_t *mddev, int raid_disks); | 268 | int (*check_reshape) (mddev_t *mddev); |
| 269 | int (*start_reshape) (mddev_t *mddev); | ||
| 253 | int (*reconfig) (mddev_t *mddev, int layout, int chunk_size); | 270 | int (*reconfig) (mddev_t *mddev, int layout, int chunk_size); |
| 254 | /* quiesce moves between quiescence states | 271 | /* quiesce moves between quiescence states |
| 255 | * 0 - fully active | 272 | * 0 - fully active |
