diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-01 12:02:01 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-01 12:02:01 -0400 |
| commit | fcff06c438b60f415af5983efe92811d6aa02ad1 (patch) | |
| tree | 704f6598b2de60a86774bc5cf152d4f051bd2dc4 /drivers/md/raid1.h | |
| parent | 068535f1fef4c90aee23eb7b9b9a71c5b72d7cd0 (diff) | |
| parent | 63f33b8dda88923487004b20fba825486d009e7b (diff) | |
Merge branch 'for-next' of git://neil.brown.name/md
Pull md updates from NeilBrown.
* 'for-next' of git://neil.brown.name/md:
DM RAID: Add support for MD RAID10
md/RAID1: Add missing case for attempting to repair known bad blocks.
md/raid5: For odirect-write performance, do not set STRIPE_PREREAD_ACTIVE.
md/raid1: don't abort a resync on the first badblock.
md: remove duplicated test on ->openers when calling do_md_stop()
raid5: Add R5_ReadNoMerge flag which prevent bio from merging at block layer
md/raid1: prevent merging too large request
md/raid1: read balance chooses idlest disk for SSD
md/raid1: make sequential read detection per disk based
MD RAID10: Export md_raid10_congested
MD: Move macros from raid1*.h to raid1*.c
MD RAID1: rename mirror_info structure
MD RAID10: rename mirror_info structure
MD RAID10: Fix compiler warning.
raid5: add a per-stripe lock
raid5: remove unnecessary bitmap write optimization
raid5: lockless access raid5 overrided bi_phys_segments
raid5: reduce chance release_stripe() taking device_lock
Diffstat (limited to 'drivers/md/raid1.h')
| -rw-r--r-- | drivers/md/raid1.h | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h index 80ded139314c..0ff3715fb7eb 100644 --- a/drivers/md/raid1.h +++ b/drivers/md/raid1.h | |||
| @@ -1,9 +1,15 @@ | |||
| 1 | #ifndef _RAID1_H | 1 | #ifndef _RAID1_H |
| 2 | #define _RAID1_H | 2 | #define _RAID1_H |
| 3 | 3 | ||
| 4 | struct mirror_info { | 4 | struct raid1_info { |
| 5 | struct md_rdev *rdev; | 5 | struct md_rdev *rdev; |
| 6 | sector_t head_position; | 6 | sector_t head_position; |
| 7 | |||
| 8 | /* When choose the best device for a read (read_balance()) | ||
| 9 | * we try to keep sequential reads one the same device | ||
| 10 | */ | ||
| 11 | sector_t next_seq_sect; | ||
| 12 | sector_t seq_start; | ||
| 7 | }; | 13 | }; |
| 8 | 14 | ||
| 9 | /* | 15 | /* |
| @@ -24,17 +30,11 @@ struct pool_info { | |||
| 24 | 30 | ||
| 25 | struct r1conf { | 31 | struct r1conf { |
| 26 | struct mddev *mddev; | 32 | struct mddev *mddev; |
| 27 | struct mirror_info *mirrors; /* twice 'raid_disks' to | 33 | struct raid1_info *mirrors; /* twice 'raid_disks' to |
| 28 | * allow for replacements. | 34 | * allow for replacements. |
| 29 | */ | 35 | */ |
| 30 | int raid_disks; | 36 | int raid_disks; |
| 31 | 37 | ||
| 32 | /* When choose the best device for a read (read_balance()) | ||
| 33 | * we try to keep sequential reads one the same device | ||
| 34 | * using 'last_used' and 'next_seq_sect' | ||
| 35 | */ | ||
| 36 | int last_used; | ||
| 37 | sector_t next_seq_sect; | ||
| 38 | /* During resync, read_balancing is only allowed on the part | 38 | /* During resync, read_balancing is only allowed on the part |
| 39 | * of the array that has been resynced. 'next_resync' tells us | 39 | * of the array that has been resynced. 'next_resync' tells us |
| 40 | * where that is. | 40 | * where that is. |
| @@ -135,20 +135,6 @@ struct r1bio { | |||
| 135 | /* DO NOT PUT ANY NEW FIELDS HERE - bios array is contiguously alloced*/ | 135 | /* DO NOT PUT ANY NEW FIELDS HERE - bios array is contiguously alloced*/ |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | /* when we get a read error on a read-only array, we redirect to another | ||
| 139 | * device without failing the first device, or trying to over-write to | ||
| 140 | * correct the read error. To keep track of bad blocks on a per-bio | ||
| 141 | * level, we store IO_BLOCKED in the appropriate 'bios' pointer | ||
| 142 | */ | ||
| 143 | #define IO_BLOCKED ((struct bio *)1) | ||
| 144 | /* When we successfully write to a known bad-block, we need to remove the | ||
| 145 | * bad-block marking which must be done from process context. So we record | ||
| 146 | * the success by setting bios[n] to IO_MADE_GOOD | ||
| 147 | */ | ||
| 148 | #define IO_MADE_GOOD ((struct bio *)2) | ||
| 149 | |||
| 150 | #define BIO_SPECIAL(bio) ((unsigned long)bio <= 2) | ||
| 151 | |||
| 152 | /* bits for r1bio.state */ | 138 | /* bits for r1bio.state */ |
| 153 | #define R1BIO_Uptodate 0 | 139 | #define R1BIO_Uptodate 0 |
| 154 | #define R1BIO_IsSync 1 | 140 | #define R1BIO_IsSync 1 |
