]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Monitor: --oneshot must imply --no-sharing
authorNeilBrown <neilb@suse.de>
Mon, 19 Sep 2011 01:01:19 +0000 (11:01 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 19 Sep 2011 01:01:19 +0000 (11:01 +1000)
Moving spares is not the purpose of '--oneshot' and without
currently --oneshot doesn't work as the check against multiple
spare-sharers prevents it.

So make --oneshot imply --no-sharing.  This is sensible and allows
--oneshot to work again.

Reported-by: Jamie Heilman <jamie@audible.transient.net>
Resolves-Debian-Bug: 641886
Signed-off-by: NeilBrown <neilb@suse.de>
mdadm.c

diff --git a/mdadm.c b/mdadm.c
index 4b817ab9a0ab06b03c1ebddcab4e7ed36f9c54c1..15335101d318894adc878a17904fb907269a65ba 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -841,6 +841,7 @@ int main(int argc, char *argv[])
                        continue;
                case O(MONITOR,'1'): /* oneshot */
                        oneshot = 1;
+                       spare_sharing = 0;
                        continue;
                case O(MONITOR,'t'): /* test */
                        test = 1;