]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md: Fix unfortunate interaction with evms
authorNeilBrown <neilb@suse.de>
Wed, 30 Dec 2009 01:08:49 +0000 (12:08 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jan 2010 23:03:49 +0000 (15:03 -0800)
commited8f6eb171b6965d5372f008c3b2267f1da57a92
treeb991476b542ce6135dc1485f8bcc8dc4ef2460d5
parentacb8be461bc008fea70999310812a4f4638d9596
md: Fix unfortunate interaction with evms

commit cbd1998377504df005302ac90d49db72a48552a6 upstream.

evms configures md arrays by:
  open device
  send ioctl
  close device

for each different ioctl needed.
Since 2.6.29, the device can disappear after the 'close'
unless a significant configuration has happened to the device.
The change made by "SET_ARRAY_INFO" can too minor to stop the device
from disappearing, but important enough that losing the change is bad.

So: make sure SET_ARRAY_INFO sets mddev->ctime, and keep the device
active as long as ctime is non-zero (it gets zeroed with lots of other
things when the array is stopped).

This is suitable for -stable kernels since 2.6.29.

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