OSDN Git Service

raid5-ppl: support disk hot add/remove with PPL
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Thu, 9 Mar 2017 09:00:02 +0000 (10:00 +0100)
committerShaohua Li <shli@fb.com>
Thu, 16 Mar 2017 23:55:56 +0000 (16:55 -0700)
commit6358c239d88c751a9f14152a8d4ad2b69f5be48f
tree624a99ba683e1ee7115b2e0c5ac9845436524a09
parent4536bf9ba2d03404655586b07f8830b6f2106242
raid5-ppl: support disk hot add/remove with PPL

Add a function to modify the log by removing an rdev when a drive fails
or adding when a spare/replacement is activated as a raid member.

Removing a disk just clears the child log rdev pointer. No new stripes
will be accepted for this child log in ppl_write_stripe() and running io
units will be processed without writing PPL to the device.

Adding a disk sets the child log rdev pointer and writes an empty PPL
header.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid5-log.h
drivers/md/raid5-ppl.c
drivers/md/raid5.c