]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md: writing to sync_action should clear the read-auto state.
authorNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:31 +0000 (12:37 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:31 +0000 (12:37 +1000)
commitc0c6d3f37083bfe5fe4581bdd1a4b626444d64db
tree4144782fa20040ec964318744d4754906110085d
parentc5725e524f680afb031773b5e446dcb946c26638
md: writing to sync_action should clear the read-auto state.

In some cases array are started in 'read-auto' state where in
nothing gets written to any device until the array is written
to.  The purpose of this is to make accidental auto-assembly
of the wrong arrays less of a risk, and to allow arrays to be
started to read suspend-to-disk images without actually changing
anything (as might happen if the array were dirty and a
resync seemed necessary).

Explicitly writing the 'sync_action' for a read-auto array currently
doesn't clear the read-auto state, so the sync action doesn't
happen, which can be confusing.

So allow any successful write to sync_action to clear any read-auto
state.

Reported-by: Alexander Kühn <alexander.kuehn@nagilum.de>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c