diff options
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r-- | drivers/md/raid5.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index 2e6123825095..3f8da26032ac 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h | |||
@@ -450,6 +450,18 @@ enum { | |||
450 | * HANDLE gets cleared if stripe_handle leaves nothing locked. | 450 | * HANDLE gets cleared if stripe_handle leaves nothing locked. |
451 | */ | 451 | */ |
452 | 452 | ||
453 | /* Note: disk_info.rdev can be set to NULL asynchronously by raid5_remove_disk. | ||
454 | * There are three safe ways to access disk_info.rdev. | ||
455 | * 1/ when holding mddev->reconfig_mutex | ||
456 | * 2/ when resync/recovery/reshape is known to be happening - i.e. in code that | ||
457 | * is called as part of performing resync/recovery/reshape. | ||
458 | * 3/ while holding rcu_read_lock(), use rcu_dereference to get the pointer | ||
459 | * and if it is non-NULL, increment rdev->nr_pending before dropping the RCU | ||
460 | * lock. | ||
461 | * When .rdev is set to NULL, the nr_pending count checked again and if | ||
462 | * it has been incremented, the pointer is put back in .rdev. | ||
463 | */ | ||
464 | |||
453 | struct disk_info { | 465 | struct disk_info { |
454 | struct md_rdev *rdev, *replacement; | 466 | struct md_rdev *rdev, *replacement; |
455 | struct page *extra_page; /* extra page to use in prexor */ | 467 | struct page *extra_page; /* extra page to use in prexor */ |