diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md-cluster.c | 10 | ||||
-rw-r--r-- | drivers/md/raid10.c | 5 | ||||
-rw-r--r-- | drivers/md/raid5-log.h | 5 | ||||
-rw-r--r-- | drivers/md/raid5.c | 6 |
4 files changed, 17 insertions, 9 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 94329e03001e..0b2af6e74fc3 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c | |||
@@ -1276,18 +1276,18 @@ static int resync_info_update(struct mddev *mddev, sector_t lo, sector_t hi) | |||
1276 | static int resync_finish(struct mddev *mddev) | 1276 | static int resync_finish(struct mddev *mddev) |
1277 | { | 1277 | { |
1278 | struct md_cluster_info *cinfo = mddev->cluster_info; | 1278 | struct md_cluster_info *cinfo = mddev->cluster_info; |
1279 | int ret = 0; | ||
1279 | 1280 | ||
1280 | clear_bit(MD_RESYNCING_REMOTE, &mddev->recovery); | 1281 | clear_bit(MD_RESYNCING_REMOTE, &mddev->recovery); |
1281 | dlm_unlock_sync(cinfo->resync_lockres); | ||
1282 | 1282 | ||
1283 | /* | 1283 | /* |
1284 | * If resync thread is interrupted so we can't say resync is finished, | 1284 | * If resync thread is interrupted so we can't say resync is finished, |
1285 | * another node will launch resync thread to continue. | 1285 | * another node will launch resync thread to continue. |
1286 | */ | 1286 | */ |
1287 | if (test_bit(MD_CLOSING, &mddev->flags)) | 1287 | if (!test_bit(MD_CLOSING, &mddev->flags)) |
1288 | return 0; | 1288 | ret = resync_info_update(mddev, 0, 0); |
1289 | else | 1289 | dlm_unlock_sync(cinfo->resync_lockres); |
1290 | return resync_info_update(mddev, 0, 0); | 1290 | return ret; |
1291 | } | 1291 | } |
1292 | 1292 | ||
1293 | static int area_resyncing(struct mddev *mddev, int direction, | 1293 | static int area_resyncing(struct mddev *mddev, int direction, |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 981898049491..d6f7978b4449 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -4529,11 +4529,12 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, | |||
4529 | allow_barrier(conf); | 4529 | allow_barrier(conf); |
4530 | } | 4530 | } |
4531 | 4531 | ||
4532 | raise_barrier(conf, 0); | ||
4532 | read_more: | 4533 | read_more: |
4533 | /* Now schedule reads for blocks from sector_nr to last */ | 4534 | /* Now schedule reads for blocks from sector_nr to last */ |
4534 | r10_bio = raid10_alloc_init_r10buf(conf); | 4535 | r10_bio = raid10_alloc_init_r10buf(conf); |
4535 | r10_bio->state = 0; | 4536 | r10_bio->state = 0; |
4536 | raise_barrier(conf, sectors_done != 0); | 4537 | raise_barrier(conf, 1); |
4537 | atomic_set(&r10_bio->remaining, 0); | 4538 | atomic_set(&r10_bio->remaining, 0); |
4538 | r10_bio->mddev = mddev; | 4539 | r10_bio->mddev = mddev; |
4539 | r10_bio->sector = sector_nr; | 4540 | r10_bio->sector = sector_nr; |
@@ -4629,6 +4630,8 @@ read_more: | |||
4629 | if (sector_nr <= last) | 4630 | if (sector_nr <= last) |
4630 | goto read_more; | 4631 | goto read_more; |
4631 | 4632 | ||
4633 | lower_barrier(conf); | ||
4634 | |||
4632 | /* Now that we have done the whole section we can | 4635 | /* Now that we have done the whole section we can |
4633 | * update reshape_progress | 4636 | * update reshape_progress |
4634 | */ | 4637 | */ |
diff --git a/drivers/md/raid5-log.h b/drivers/md/raid5-log.h index a001808a2b77..bfb811407061 100644 --- a/drivers/md/raid5-log.h +++ b/drivers/md/raid5-log.h | |||
@@ -46,6 +46,11 @@ extern int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add); | |||
46 | extern void ppl_quiesce(struct r5conf *conf, int quiesce); | 46 | extern void ppl_quiesce(struct r5conf *conf, int quiesce); |
47 | extern int ppl_handle_flush_request(struct r5l_log *log, struct bio *bio); | 47 | extern int ppl_handle_flush_request(struct r5l_log *log, struct bio *bio); |
48 | 48 | ||
49 | static inline bool raid5_has_log(struct r5conf *conf) | ||
50 | { | ||
51 | return test_bit(MD_HAS_JOURNAL, &conf->mddev->flags); | ||
52 | } | ||
53 | |||
49 | static inline bool raid5_has_ppl(struct r5conf *conf) | 54 | static inline bool raid5_has_ppl(struct r5conf *conf) |
50 | { | 55 | { |
51 | return test_bit(MD_HAS_PPL, &conf->mddev->flags); | 56 | return test_bit(MD_HAS_PPL, &conf->mddev->flags); |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 4ce0d7502fad..e4e98f47865d 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -733,7 +733,7 @@ static bool stripe_can_batch(struct stripe_head *sh) | |||
733 | { | 733 | { |
734 | struct r5conf *conf = sh->raid_conf; | 734 | struct r5conf *conf = sh->raid_conf; |
735 | 735 | ||
736 | if (conf->log || raid5_has_ppl(conf)) | 736 | if (raid5_has_log(conf) || raid5_has_ppl(conf)) |
737 | return false; | 737 | return false; |
738 | return test_bit(STRIPE_BATCH_READY, &sh->state) && | 738 | return test_bit(STRIPE_BATCH_READY, &sh->state) && |
739 | !test_bit(STRIPE_BITMAP_PENDING, &sh->state) && | 739 | !test_bit(STRIPE_BITMAP_PENDING, &sh->state) && |
@@ -7737,7 +7737,7 @@ static int raid5_resize(struct mddev *mddev, sector_t sectors) | |||
7737 | sector_t newsize; | 7737 | sector_t newsize; |
7738 | struct r5conf *conf = mddev->private; | 7738 | struct r5conf *conf = mddev->private; |
7739 | 7739 | ||
7740 | if (conf->log || raid5_has_ppl(conf)) | 7740 | if (raid5_has_log(conf) || raid5_has_ppl(conf)) |
7741 | return -EINVAL; | 7741 | return -EINVAL; |
7742 | sectors &= ~((sector_t)conf->chunk_sectors - 1); | 7742 | sectors &= ~((sector_t)conf->chunk_sectors - 1); |
7743 | newsize = raid5_size(mddev, sectors, mddev->raid_disks); | 7743 | newsize = raid5_size(mddev, sectors, mddev->raid_disks); |
@@ -7788,7 +7788,7 @@ static int check_reshape(struct mddev *mddev) | |||
7788 | { | 7788 | { |
7789 | struct r5conf *conf = mddev->private; | 7789 | struct r5conf *conf = mddev->private; |
7790 | 7790 | ||
7791 | if (conf->log || raid5_has_ppl(conf)) | 7791 | if (raid5_has_log(conf) || raid5_has_ppl(conf)) |
7792 | return -EINVAL; | 7792 | return -EINVAL; |
7793 | if (mddev->delta_disks == 0 && | 7793 | if (mddev->delta_disks == 0 && |
7794 | mddev->new_layout == mddev->layout && | 7794 | mddev->new_layout == mddev->layout && |