File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -581,6 +581,25 @@ static inline bool md_is_rdwr(struct mddev *mddev)
581
581
return (mddev -> ro == MD_RDWR );
582
582
}
583
583
584
+ static inline bool reshape_interrupted (struct mddev * mddev )
585
+ {
586
+ /* reshape never start */
587
+ if (mddev -> reshape_position == MaxSector )
588
+ return false;
589
+
590
+ /* interrupted */
591
+ if (!test_bit (MD_RECOVERY_RUNNING , & mddev -> recovery ))
592
+ return true;
593
+
594
+ /* running reshape will be interrupted soon. */
595
+ if (test_bit (MD_RECOVERY_WAIT , & mddev -> recovery ) ||
596
+ test_bit (MD_RECOVERY_INTR , & mddev -> recovery ) ||
597
+ test_bit (MD_RECOVERY_FROZEN , & mddev -> recovery ))
598
+ return true;
599
+
600
+ return false;
601
+ }
602
+
584
603
static inline int __must_check mddev_lock (struct mddev * mddev )
585
604
{
586
605
return mutex_lock_interruptible (& mddev -> reconfig_mutex );
You can’t perform that action at this time.
0 commit comments