]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md: create externally visible flags for supporting hot-replace.
authorNeilBrown <neilb@suse.de>
Wed, 9 Nov 2011 00:32:06 +0000 (11:32 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 9 Nov 2011 00:32:06 +0000 (11:32 +1100)
commit85770838b83fc35b162e3629abe2098806efd510
tree02385ebed1450d9c239bd208c9c81d7553b49f41
parent91e58fcb204add51e4a1d6db1a14787871720c57
md: create externally visible flags for supporting hot-replace.

hot-replace is a feature being added to md which will allow a
device to be replaced without removing it from the array first.

With hot-replace a spare can be activated and recovery can start while
the original device is still in place, thus allowing a transition from
an unreliable device to a reliable device without leaving the array
degraded during the transition.  It can also be use when the original
device is still reliable but it not wanted for some reason.

This will eventually be supported in RAID4/5/6 and RAID10.

This patch adds a super-block flag to distinguish the replacement
device.  If an old kernel sees this flag it will reject the device.

It also adds two per-device flags which are viewable and settable via
sysfs.
   "replaceable" can be set to request that a device be replaced.
   "replacement" is set to show that this device is replacing another
   device.

The "rd%d" links in /sys/block/mdXx/md only apply to the original
device, not the replacement.  We currently don't make links for the
replacement - there doesn't seem to be a need.

Signed-off-by: NeilBrown <neilb@suse.de>
Documentation/md.txt
drivers/md/md.c
drivers/md/md.h
include/linux/raid/md_p.h