diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-18 14:51:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-18 14:51:08 -0400 |
commit | 74cbd96bc2e00f5daa805e2ebf49e998f7045062 (patch) | |
tree | e3e72349fc4ce85bdbe948c935199b094fc35ae4 | |
parent | bef85bd7db2669291e33c59875fae33d24c11da3 (diff) | |
parent | 6409e84ec58fc4c0085d8921f8e01815dc871971 (diff) |
Merge tag 'md/4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
Pull MD fixes from Shaohua Li:
- raid5-ppl fix by Artur. This one is introduced in this release cycle.
- raid5 reshape fix by Xiao. This is an old bug and will be added to
stable.
- bitmap fix by Guoqing.
* tag 'md/4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
raid5-ppl: use BIOSET_NEED_BVECS when creating bioset
Raid5 should update rdev->sectors after reshape
md/bitmap: don't read page from device with Bitmap_sync
-rw-r--r-- | drivers/md/bitmap.c | 3 | ||||
-rw-r--r-- | drivers/md/md.h | 4 | ||||
-rw-r--r-- | drivers/md/raid5-ppl.c | 2 | ||||
-rw-r--r-- | drivers/md/raid5.c | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index f4eace5ea184..40f3cd7eab0f 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -156,7 +156,8 @@ static int read_sb_page(struct mddev *mddev, loff_t offset, | |||
156 | 156 | ||
157 | rdev_for_each(rdev, mddev) { | 157 | rdev_for_each(rdev, mddev) { |
158 | if (! test_bit(In_sync, &rdev->flags) | 158 | if (! test_bit(In_sync, &rdev->flags) |
159 | || test_bit(Faulty, &rdev->flags)) | 159 | || test_bit(Faulty, &rdev->flags) |
160 | || test_bit(Bitmap_sync, &rdev->flags)) | ||
160 | continue; | 161 | continue; |
161 | 162 | ||
162 | target = offset + index * (PAGE_SIZE/512); | 163 | target = offset + index * (PAGE_SIZE/512); |
diff --git a/drivers/md/md.h b/drivers/md/md.h index 991f0fe2dcc6..b50eb4ac1b82 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -134,7 +134,9 @@ enum flag_bits { | |||
134 | Faulty, /* device is known to have a fault */ | 134 | Faulty, /* device is known to have a fault */ |
135 | In_sync, /* device is in_sync with rest of array */ | 135 | In_sync, /* device is in_sync with rest of array */ |
136 | Bitmap_sync, /* ..actually, not quite In_sync. Need a | 136 | Bitmap_sync, /* ..actually, not quite In_sync. Need a |
137 | * bitmap-based recovery to get fully in sync | 137 | * bitmap-based recovery to get fully in sync. |
138 | * The bit is only meaningful before device | ||
139 | * has been passed to pers->hot_add_disk. | ||
138 | */ | 140 | */ |
139 | WriteMostly, /* Avoid reading if at all possible */ | 141 | WriteMostly, /* Avoid reading if at all possible */ |
140 | AutoDetected, /* added by auto-detect */ | 142 | AutoDetected, /* added by auto-detect */ |
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c index 77cce3573aa8..44ad5baf3206 100644 --- a/drivers/md/raid5-ppl.c +++ b/drivers/md/raid5-ppl.c | |||
@@ -1150,7 +1150,7 @@ int ppl_init_log(struct r5conf *conf) | |||
1150 | goto err; | 1150 | goto err; |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | ppl_conf->bs = bioset_create(conf->raid_disks, 0, 0); | 1153 | ppl_conf->bs = bioset_create(conf->raid_disks, 0, BIOSET_NEED_BVECS); |
1154 | if (!ppl_conf->bs) { | 1154 | if (!ppl_conf->bs) { |
1155 | ret = -ENOMEM; | 1155 | ret = -ENOMEM; |
1156 | goto err; | 1156 | goto err; |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 2ceb338b094b..aeeb8d6854e2 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -7951,12 +7951,10 @@ static void end_reshape(struct r5conf *conf) | |||
7951 | { | 7951 | { |
7952 | 7952 | ||
7953 | if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { | 7953 | if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { |
7954 | struct md_rdev *rdev; | ||
7955 | 7954 | ||
7956 | spin_lock_irq(&conf->device_lock); | 7955 | spin_lock_irq(&conf->device_lock); |
7957 | conf->previous_raid_disks = conf->raid_disks; | 7956 | conf->previous_raid_disks = conf->raid_disks; |
7958 | rdev_for_each(rdev, conf->mddev) | 7957 | md_finish_reshape(conf->mddev); |
7959 | rdev->data_offset = rdev->new_data_offset; | ||
7960 | smp_wmb(); | 7958 | smp_wmb(); |
7961 | conf->reshape_progress = MaxSector; | 7959 | conf->reshape_progress = MaxSector; |
7962 | conf->mddev->reshape_position = MaxSector; | 7960 | conf->mddev->reshape_position = MaxSector; |