diff options
Diffstat (limited to 'include/linux/raid/md_k.h')
-rw-r--r-- | include/linux/raid/md_k.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index c9a0d4013be7..8c14ba565a45 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -15,6 +15,9 @@ | |||
15 | #ifndef _MD_K_H | 15 | #ifndef _MD_K_H |
16 | #define _MD_K_H | 16 | #define _MD_K_H |
17 | 17 | ||
18 | /* and dm-bio-list.h is not under include/linux because.... ??? */ | ||
19 | #include "../../../drivers/md/dm-bio-list.h" | ||
20 | |||
18 | #define MD_RESERVED 0UL | 21 | #define MD_RESERVED 0UL |
19 | #define LINEAR 1UL | 22 | #define LINEAR 1UL |
20 | #define RAID0 2UL | 23 | #define RAID0 2UL |
@@ -180,6 +183,10 @@ struct mdk_rdev_s | |||
180 | 183 | ||
181 | int desc_nr; /* descriptor index in the superblock */ | 184 | int desc_nr; /* descriptor index in the superblock */ |
182 | int raid_disk; /* role of device in array */ | 185 | int raid_disk; /* role of device in array */ |
186 | int saved_raid_disk; /* role that device used to have in the | ||
187 | * array and could again if we did a partial | ||
188 | * resync from the bitmap | ||
189 | */ | ||
183 | 190 | ||
184 | atomic_t nr_pending; /* number of pending requests. | 191 | atomic_t nr_pending; /* number of pending requests. |
185 | * only maintained for arrays that | 192 | * only maintained for arrays that |
@@ -252,6 +259,11 @@ struct mddev_s | |||
252 | atomic_t recovery_active; /* blocks scheduled, but not written */ | 259 | atomic_t recovery_active; /* blocks scheduled, but not written */ |
253 | wait_queue_head_t recovery_wait; | 260 | wait_queue_head_t recovery_wait; |
254 | sector_t recovery_cp; | 261 | sector_t recovery_cp; |
262 | |||
263 | spinlock_t write_lock; | ||
264 | wait_queue_head_t sb_wait; /* for waiting on superblock updates */ | ||
265 | atomic_t pending_writes; /* number of active superblock writes */ | ||
266 | |||
255 | unsigned int safemode; /* if set, update "clean" superblock | 267 | unsigned int safemode; /* if set, update "clean" superblock |
256 | * when no writes pending. | 268 | * when no writes pending. |
257 | */ | 269 | */ |
@@ -260,6 +272,13 @@ struct mddev_s | |||
260 | atomic_t writes_pending; | 272 | atomic_t writes_pending; |
261 | request_queue_t *queue; /* for plugging ... */ | 273 | request_queue_t *queue; /* for plugging ... */ |
262 | 274 | ||
275 | struct bitmap *bitmap; /* the bitmap for the device */ | ||
276 | struct file *bitmap_file; /* the bitmap file */ | ||
277 | long bitmap_offset; /* offset from superblock of | ||
278 | * start of bitmap. May be | ||
279 | * negative, but not '0' | ||
280 | */ | ||
281 | |||
263 | struct list_head all_mddevs; | 282 | struct list_head all_mddevs; |
264 | }; | 283 | }; |
265 | 284 | ||
@@ -291,7 +310,7 @@ struct mdk_personality_s | |||
291 | int (*hot_add_disk) (mddev_t *mddev, mdk_rdev_t *rdev); | 310 | int (*hot_add_disk) (mddev_t *mddev, mdk_rdev_t *rdev); |
292 | int (*hot_remove_disk) (mddev_t *mddev, int number); | 311 | int (*hot_remove_disk) (mddev_t *mddev, int number); |
293 | int (*spare_active) (mddev_t *mddev); | 312 | int (*spare_active) (mddev_t *mddev); |
294 | int (*sync_request)(mddev_t *mddev, sector_t sector_nr, int go_faster); | 313 | sector_t (*sync_request)(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster); |
295 | int (*resize) (mddev_t *mddev, sector_t sectors); | 314 | int (*resize) (mddev_t *mddev, sector_t sectors); |
296 | int (*reshape) (mddev_t *mddev, int raid_disks); | 315 | int (*reshape) (mddev_t *mddev, int raid_disks); |
297 | int (*reconfig) (mddev_t *mddev, int layout, int chunk_size); | 316 | int (*reconfig) (mddev_t *mddev, int layout, int chunk_size); |
@@ -334,6 +353,7 @@ typedef struct mdk_thread_s { | |||
334 | unsigned long flags; | 353 | unsigned long flags; |
335 | struct completion *event; | 354 | struct completion *event; |
336 | struct task_struct *tsk; | 355 | struct task_struct *tsk; |
356 | unsigned long timeout; | ||
337 | const char *name; | 357 | const char *name; |
338 | } mdk_thread_t; | 358 | } mdk_thread_t; |
339 | 359 | ||