]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md: refine reporting of resync/reshape delays.
authorNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:29 +0000 (12:37 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:29 +0000 (12:37 +1000)
commitc9b5855741094eece6cacd6a284be49b3971e505
tree531a637b8bb6b2c5c067759c9bb5b6e15d17fa62
parent391eb7e5e95934be5f2a9f9790bd4a44bc59232a
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