File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -539,8 +539,11 @@ static void *raid0_takeover_raid45(struct mddev *mddev)
539539 mddev -> delta_disks = -1 ;
540540 /* make sure it will be not marked as dirty */
541541 mddev -> recovery_cp = MaxSector ;
542+ clear_bit (MD_HAS_JOURNAL , & mddev -> flags );
543+ clear_bit (MD_JOURNAL_CLEAN , & mddev -> flags );
542544
543545 create_strip_zones (mddev , & priv_conf );
546+
544547 return priv_conf ;
545548}
546549
@@ -580,6 +583,7 @@ static void *raid0_takeover_raid10(struct mddev *mddev)
580583 mddev -> degraded = 0 ;
581584 /* make sure it will be not marked as dirty */
582585 mddev -> recovery_cp = MaxSector ;
586+ clear_bit (MD_FAILFAST_SUPPORTED , & mddev -> flags );
583587
584588 create_strip_zones (mddev , & priv_conf );
585589 return priv_conf ;
@@ -622,6 +626,7 @@ static void *raid0_takeover_raid1(struct mddev *mddev)
622626 mddev -> raid_disks = 1 ;
623627 /* make sure it will be not marked as dirty */
624628 mddev -> recovery_cp = MaxSector ;
629+ clear_bit (MD_FAILFAST_SUPPORTED , & mddev -> flags );
625630
626631 create_strip_zones (mddev , & priv_conf );
627632 return priv_conf ;
Original file line number Diff line number Diff line change @@ -3243,9 +3243,12 @@ static void *raid1_takeover(struct mddev *mddev)
32433243 mddev -> new_layout = 0 ;
32443244 mddev -> new_chunk_sectors = 0 ;
32453245 conf = setup_conf (mddev );
3246- if (!IS_ERR (conf ))
3246+ if (!IS_ERR (conf )) {
32473247 /* Array must appear to be quiesced */
32483248 conf -> array_frozen = 1 ;
3249+ clear_bit (MD_HAS_JOURNAL , & mddev -> flags );
3250+ clear_bit (MD_JOURNAL_CLEAN , & mddev -> flags );
3251+ }
32493252 return conf ;
32503253 }
32513254 return ERR_PTR (- EINVAL );
Original file line number Diff line number Diff line change @@ -7811,6 +7811,7 @@ static void *raid45_takeover_raid0(struct mddev *mddev, int level)
78117811static void * raid5_takeover_raid1 (struct mddev * mddev )
78127812{
78137813 int chunksect ;
7814+ void * ret ;
78147815
78157816 if (mddev -> raid_disks != 2 ||
78167817 mddev -> degraded > 1 )
@@ -7832,7 +7833,10 @@ static void *raid5_takeover_raid1(struct mddev *mddev)
78327833 mddev -> new_layout = ALGORITHM_LEFT_SYMMETRIC ;
78337834 mddev -> new_chunk_sectors = chunksect ;
78347835
7835- return setup_conf (mddev );
7836+ ret = setup_conf (mddev );
7837+ if (!IS_ERR_VALUE (ret ))
7838+ clear_bit (MD_FAILFAST_SUPPORTED , & mddev -> flags );
7839+ return ret ;
78367840}
78377841
78387842static void * raid5_takeover_raid6 (struct mddev * mddev )
You can’t perform that action at this time.
0 commit comments