diff options
Diffstat (limited to 'drivers/md/raid1.h')
| -rw-r--r-- | drivers/md/raid1.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h index 0ff3715fb7eb..9bebca7bff2f 100644 --- a/drivers/md/raid1.h +++ b/drivers/md/raid1.h | |||
| @@ -41,6 +41,19 @@ struct r1conf { | |||
| 41 | */ | 41 | */ |
| 42 | sector_t next_resync; | 42 | sector_t next_resync; |
| 43 | 43 | ||
| 44 | /* When raid1 starts resync, we divide array into four partitions | ||
| 45 | * |---------|--------------|---------------------|-------------| | ||
| 46 | * next_resync start_next_window end_window | ||
| 47 | * start_next_window = next_resync + NEXT_NORMALIO_DISTANCE | ||
| 48 | * end_window = start_next_window + NEXT_NORMALIO_DISTANCE | ||
| 49 | * current_window_requests means the count of normalIO between | ||
| 50 | * start_next_window and end_window. | ||
| 51 | * next_window_requests means the count of normalIO after end_window. | ||
| 52 | * */ | ||
| 53 | sector_t start_next_window; | ||
| 54 | int current_window_requests; | ||
| 55 | int next_window_requests; | ||
| 56 | |||
| 44 | spinlock_t device_lock; | 57 | spinlock_t device_lock; |
| 45 | 58 | ||
| 46 | /* list of 'struct r1bio' that need to be processed by raid1d, | 59 | /* list of 'struct r1bio' that need to be processed by raid1d, |
| @@ -65,6 +78,7 @@ struct r1conf { | |||
| 65 | int nr_waiting; | 78 | int nr_waiting; |
| 66 | int nr_queued; | 79 | int nr_queued; |
| 67 | int barrier; | 80 | int barrier; |
| 81 | int array_frozen; | ||
| 68 | 82 | ||
| 69 | /* Set to 1 if a full sync is needed, (fresh device added). | 83 | /* Set to 1 if a full sync is needed, (fresh device added). |
| 70 | * Cleared when a sync completes. | 84 | * Cleared when a sync completes. |
| @@ -111,6 +125,7 @@ struct r1bio { | |||
| 111 | * in this BehindIO request | 125 | * in this BehindIO request |
| 112 | */ | 126 | */ |
| 113 | sector_t sector; | 127 | sector_t sector; |
| 128 | sector_t start_next_window; | ||
| 114 | int sectors; | 129 | int sectors; |
| 115 | unsigned long state; | 130 | unsigned long state; |
| 116 | struct mddev *mddev; | 131 | struct mddev *mddev; |
