WORKAROUND: mdadm hangs during reshape
During reshape when reshape is finished in md, progress_reshape() hangs on select(). This is because 'sync_completed' is reset to zero before 'sync_action' becomes 'idle', and we don't look for notification on 'sync_action'. So if completed becomes zero after reshape_progress has made some progress, then deduce that reshape has finished. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
16d4d84e5d
commit
26d6e1574a
11
Grow.c
11
Grow.c
|
@ -2425,6 +2425,17 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
|
|||
action, 20) <= 0 ||
|
||||
strncmp(action, "reshape", 7) != 0)
|
||||
break;
|
||||
/* Some kernels reset 'sync_completed' to zero
|
||||
* before setting 'sync_action' to 'idle'.
|
||||
* So we need these extra tests.
|
||||
*/
|
||||
if (completed == 0 && advancing
|
||||
&& info->reshape_progress > 0)
|
||||
break;
|
||||
if (completed == 0 && !advancing
|
||||
&& info->reshape_progress < (info->component_size
|
||||
* reshape->after.data_disks))
|
||||
break;
|
||||
FD_ZERO(&rfds);
|
||||
FD_SET(fd, &rfds);
|
||||
select(fd+1, NULL, NULL, &rfds, NULL);
|
||||
|
|
Loading…
Reference in New Issue