]> git.baikalelectronics.ru Git - kernel.git/commit
md: fix small irregularity with start_ro module parameter
authorNeilBrown <neilb@suse.de>
Wed, 30 Dec 2009 01:08:50 +0000 (12:08 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 30 Dec 2009 04:20:12 +0000 (15:20 +1100)
commit9d8aa9a6430e7461e2e4c5d6a31fa9fe74d2b257
tree14f29af551fc226dc4451f1089d4f08dc2611c0d
parentb2a03894fdb45cf80b9793728662f5b3b8739b24
md: fix small irregularity with start_ro module parameter

The start_ro modules parameter can be used to force arrays to be
started in 'auto-readonly' in which they are read-only until the first
write.  This ensures that no resync/recovery happens until something
else writes to the device.  This is important for resume-from-disk
off an md array.

However if an array is started 'readonly' (by writing 'readonly' to
the 'array_state' sysfs attribute) we want it to be really 'readonly',
not 'auto-readonly'.

So strengthen the condition to only set auto-readonly if the
array is not already read-only.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c