[sheepdog] [PATCH v2 0/6] md: add recovery support
Liu Yuan
namei.unix at gmail.com
Wed Mar 27 06:10:55 CET 2013
From: Liu Yuan <tailai.ly at taobao.com>
v2:
- add 054 only to md group
- rework patch 3/6
- make iteration of WD more efficient
This patch set mainly add md recovery support which unifies node recovery and
disk recovery.
I choose to take advantage of current node recovery mechanism because:
1. It supports multiple failure events
2. It provide nice race-free and wait queue mechanism for VM IO requests and
recovery IO requests.
3. already-made logic that can recover objects from other nodes. This is very
crutial to md recovery because we distribute objects across disks without
extra copies.
4. Maintan one mechanism is always better than two
So disk failure will simply be seen as a node recovery without epoch lifted and
md recovery has all the merits of node recovery:
1. multiple disk failures handling
2. serve VM IO requests while in recovery
3. can hot-plug and hot-unplug the disks (missing part yet)
Besides, another nice spin-off is that with unified recovery, both node and disk
recovery can suspend and supersede each other (missing part yet)
The missing parts will be implemented in later patch.
Liu Yuan (6):
sheep: prepare and cleanup err_to_stderr() for MD recovery
work queue: don't call worker func if not assigned
recovery: start tgt_epoch with rw->epoch instead of 'rw->epoch - 1'
md: implement automatic recovery
tests: modify _start_sheep helper with one more disk
tests: add a test 055 for md
sheep/journal_file.c | 3 +-
sheep/md.c | 192 ++++++++++++++++++++++++++++++++++++++++++++++++--
sheep/object_cache.c | 3 +-
sheep/plain_store.c | 44 +++++-------
sheep/recovery.c | 4 +-
sheep/sheep.c | 4 +-
sheep/sheep_priv.h | 4 +-
sheep/work.c | 3 +-
tests/055 | 46 ++++++++++++
tests/055.out | 24 +++++++
tests/common.rc | 2 +-
tests/group | 1 +
12 files changed, 291 insertions(+), 39 deletions(-)
create mode 100755 tests/055
create mode 100644 tests/055.out
--
1.7.9.5
More information about the sheepdog
mailing list