diff options
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r-- | drivers/md/raid5.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index 70c49329ca9a..2113ffa82c7a 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h | |||
@@ -197,6 +197,7 @@ enum reconstruct_states { | |||
197 | struct stripe_head { | 197 | struct stripe_head { |
198 | struct hlist_node hash; | 198 | struct hlist_node hash; |
199 | struct list_head lru; /* inactive_list or handle_list */ | 199 | struct list_head lru; /* inactive_list or handle_list */ |
200 | struct llist_node release_list; | ||
200 | struct r5conf *raid_conf; | 201 | struct r5conf *raid_conf; |
201 | short generation; /* increments with every | 202 | short generation; /* increments with every |
202 | * reshape */ | 203 | * reshape */ |
@@ -211,6 +212,8 @@ struct stripe_head { | |||
211 | enum check_states check_state; | 212 | enum check_states check_state; |
212 | enum reconstruct_states reconstruct_state; | 213 | enum reconstruct_states reconstruct_state; |
213 | spinlock_t stripe_lock; | 214 | spinlock_t stripe_lock; |
215 | int cpu; | ||
216 | struct r5worker_group *group; | ||
214 | /** | 217 | /** |
215 | * struct stripe_operations | 218 | * struct stripe_operations |
216 | * @target - STRIPE_OP_COMPUTE_BLK target | 219 | * @target - STRIPE_OP_COMPUTE_BLK target |
@@ -321,6 +324,7 @@ enum { | |||
321 | STRIPE_OPS_REQ_PENDING, | 324 | STRIPE_OPS_REQ_PENDING, |
322 | STRIPE_ON_UNPLUG_LIST, | 325 | STRIPE_ON_UNPLUG_LIST, |
323 | STRIPE_DISCARD, | 326 | STRIPE_DISCARD, |
327 | STRIPE_ON_RELEASE_LIST, | ||
324 | }; | 328 | }; |
325 | 329 | ||
326 | /* | 330 | /* |
@@ -363,6 +367,19 @@ struct disk_info { | |||
363 | struct md_rdev *rdev, *replacement; | 367 | struct md_rdev *rdev, *replacement; |
364 | }; | 368 | }; |
365 | 369 | ||
370 | struct r5worker { | ||
371 | struct work_struct work; | ||
372 | struct r5worker_group *group; | ||
373 | bool working; | ||
374 | }; | ||
375 | |||
376 | struct r5worker_group { | ||
377 | struct list_head handle_list; | ||
378 | struct r5conf *conf; | ||
379 | struct r5worker *workers; | ||
380 | int stripes_cnt; | ||
381 | }; | ||
382 | |||
366 | struct r5conf { | 383 | struct r5conf { |
367 | struct hlist_head *stripe_hashtbl; | 384 | struct hlist_head *stripe_hashtbl; |
368 | struct mddev *mddev; | 385 | struct mddev *mddev; |
@@ -386,6 +403,7 @@ struct r5conf { | |||
386 | int prev_chunk_sectors; | 403 | int prev_chunk_sectors; |
387 | int prev_algo; | 404 | int prev_algo; |
388 | short generation; /* increments with every reshape */ | 405 | short generation; /* increments with every reshape */ |
406 | seqcount_t gen_lock; /* lock against generation changes */ | ||
389 | unsigned long reshape_checkpoint; /* Time we last updated | 407 | unsigned long reshape_checkpoint; /* Time we last updated |
390 | * metadata */ | 408 | * metadata */ |
391 | long long min_offset_diff; /* minimum difference between | 409 | long long min_offset_diff; /* minimum difference between |
@@ -445,6 +463,7 @@ struct r5conf { | |||
445 | */ | 463 | */ |
446 | atomic_t active_stripes; | 464 | atomic_t active_stripes; |
447 | struct list_head inactive_list; | 465 | struct list_head inactive_list; |
466 | struct llist_head released_stripes; | ||
448 | wait_queue_head_t wait_for_stripe; | 467 | wait_queue_head_t wait_for_stripe; |
449 | wait_queue_head_t wait_for_overlap; | 468 | wait_queue_head_t wait_for_overlap; |
450 | int inactive_blocked; /* release of inactive stripes blocked, | 469 | int inactive_blocked; /* release of inactive stripes blocked, |
@@ -458,6 +477,9 @@ struct r5conf { | |||
458 | * the new thread here until we fully activate the array. | 477 | * the new thread here until we fully activate the array. |
459 | */ | 478 | */ |
460 | struct md_thread *thread; | 479 | struct md_thread *thread; |
480 | struct r5worker_group *worker_groups; | ||
481 | int group_cnt; | ||
482 | int worker_cnt_per_group; | ||
461 | }; | 483 | }; |
462 | 484 | ||
463 | /* | 485 | /* |