]> git.baikalelectronics.ru Git - kernel.git/commit
md: refine reporting of resync/reshape delays.
authorNeilBrown <neilb@suse.de>
Thu, 11 Oct 2012 03:25:57 +0000 (14:25 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 11 Oct 2012 03:25:57 +0000 (14:25 +1100)
commitff3d51ccf91037a8c7c8da6e4d2f6ba86d62c1ce
tree9bf42eb456ea85126489dad2283ed0343d91172d
parent3d4872460dc6ca8e375fd86e316ca9558567c349
md: refine reporting of resync/reshape delays.

If 'resync_max' is set to 0 (as is often done when starting a
reshape, so the mdadm can remain in control during a sensitive
period), and if the reshape request is initially delayed because
another array using the same array is resyncing or reshaping etc,
when user-space cannot easily tell when the delay changes from being
due to a conflicting reshape, to being due to resync_max = 0.

So introduce a new state: (curr_resync == 3) to reflect this, make
sure it is visible both via /proc/mdstat and via the "sync_completed"
sysfs attribute, and ensure that the event transition from one delay
state to the other is properly notified.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c