]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Monitor: don't open md array that doesn't exist.
authorNeilBrown <neilb@suse.de>
Tue, 28 Oct 2014 21:48:02 +0000 (08:48 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 25 Nov 2014 00:44:29 +0000 (11:44 +1100)
commit9a518d81fe614d4fd8391c94bc99d5458cd3324f
treeb848ac11ad55d774d0630e179d714c01ba30c612
parent7ae077587156db9a015103da79145c454eccd8b6
Monitor: don't open md array that doesn't exist.

Opening a block-special-device for an array that doesn't
exist causes that array to be instantiated (as an empty array).
Races at array shutdown can cause the array to spontaneously
re-appear if some deamon notices a 'change' event and goes
to investigate.

Teach "mdadm --monitor" to avoid this race by checking the
"array_state" before opening the device.

Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Monitor.c