summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2015-08-13 21:32:01 (GMT)
committerNeilBrown <neilb@suse.com>2015-10-24 06:16:19 (GMT)
commit355810d12a8974ff1f3a7336149b65d4bda84634 (patch)
tree797e21737913321227da1a1f889f9f36656f96ad /.gitignore
parent0576b1c618ef220051a8555f2aa7dd316e88f330 (diff)
downloadlinux-355810d12a8974ff1f3a7336149b65d4bda84634.tar.xz
raid5: log recovery
This is the log recovery support. The process is quite straightforward. We scan the log and read all valid meta/data/parity into memory. If a stripe's data/parity checksum is correct, the stripe will be recoveried. Otherwise, it's discarded and we don't scan the log further. The reclaim process guarantees stripe which starts to be flushed raid disks has completed data/parity and has correct checksum. To recovery a stripe, we just copy its data/parity to corresponding raid disks. The trick thing is superblock update after recovery. we can't let superblock point to last valid meta block. The log might look like: | meta 1| meta 2| meta 3| meta 1 is valid, meta 2 is invalid. meta 3 could be valid. If superblock points to meta 1, we write a new valid meta 2n. If crash happens again, new recovery will start from meta 1. Since meta 2n is valid, recovery will think meta 3 is valid, which is wrong. The solution is we create a new meta in meta2 with its seq == meta 1's seq + 10 and let superblock points to meta2. recovery will not think meta 3 is a valid meta, because its seq is wrong Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions