https://github.com/torvalds/linux
Revision 5bf295975416f8e97117bbbcfb0191c00bc3e2b4 authored by NeilBrown on 07 May 2009, 02:50:57 UTC, committed by NeilBrown on 07 May 2009, 02:50:57 UTC
Being able to write 'clean' to an 'array_state' of an inactive array
to activate it in 'clean' mode is both unnecessary and inconvenient.

It is unnecessary because the same can be achieved by writing
'active'.  This activates and array, but it still remains 'clean'
until the first write.

It is inconvenient because writing 'clean' is more often used to
cause an 'active' array to revert to 'clean' mode (thus blocking
any writes until a 'write-pending' is promoted to 'active').

Allowing 'clean' to both activate an array and mark an active array as
clean can lead to races:  One program writes 'clean' to mark the
active array as clean at the same time as another program writes
'inactive' to deactivate (stop) and active array.  Depending on which
writes first, the array could be deactivated and immediately
reactivated which isn't what was desired.

So just disable the use of 'clean' to activate an array.

This avoids a race that can be triggered with mdadm-3.0 and external
metadata, so it suitable for -stable.

Reported-by: Rafal Marszewski <rafal.marszewski@intel.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: NeilBrown <neilb@suse.de>
1 parent 110518b
History
Tip revision: 5bf295975416f8e97117bbbcfb0191c00bc3e2b4 authored by NeilBrown on 07 May 2009, 02:50:57 UTC
md: remove ability to explicit set an inactive array to 'clean'.
Tip revision: 5bf2959
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 885 bytes
.mailmap -rw-r--r-- 3.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.6 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 144.4 KB
Makefile -rw-r--r-- 53.8 KB
README -rw-r--r-- 16.7 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top