Skip to content

Commit 74cbd96

Browse files
committed
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
2 parents bef85bd + 6409e84 commit 74cbd96

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

drivers/md/bitmap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ static int read_sb_page(struct mddev *mddev, loff_t offset,
156156

157157
rdev_for_each(rdev, mddev) {
158158
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))
160161
continue;
161162

162163
target = offset + index * (PAGE_SIZE/512);

drivers/md/md.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ enum flag_bits {
134134
Faulty, /* device is known to have a fault */
135135
In_sync, /* device is in_sync with rest of array */
136136
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.
138140
*/
139141
WriteMostly, /* Avoid reading if at all possible */
140142
AutoDetected, /* added by auto-detect */

drivers/md/raid5-ppl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ int ppl_init_log(struct r5conf *conf)
11501150
goto err;
11511151
}
11521152

1153-
ppl_conf->bs = bioset_create(conf->raid_disks, 0, 0);
1153+
ppl_conf->bs = bioset_create(conf->raid_disks, 0, BIOSET_NEED_BVECS);
11541154
if (!ppl_conf->bs) {
11551155
ret = -ENOMEM;
11561156
goto err;

drivers/md/raid5.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7951,12 +7951,10 @@ static void end_reshape(struct r5conf *conf)
79517951
{
79527952

79537953
if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) {
7954-
struct md_rdev *rdev;
79557954

79567955
spin_lock_irq(&conf->device_lock);
79577956
conf->previous_raid_disks = conf->raid_disks;
7958-
rdev_for_each(rdev, conf->mddev)
7959-
rdev->data_offset = rdev->new_data_offset;
7957+
md_finish_reshape(conf->mddev);
79607958
smp_wmb();
79617959
conf->reshape_progress = MaxSector;
79627960
conf->mddev->reshape_position = MaxSector;

0 commit comments

Comments
 (0)