]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: RAID5 and RAID6
authorDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 29 Jan 2013 23:40:14 +0000 (18:40 -0500)
committerChris Mason <chris.mason@fusionio.com>
Fri, 1 Feb 2013 19:24:23 +0000 (14:24 -0500)
commit7da377a1a78d7c1a01e0af8ef2f743dc71ed41ad
treec1018ba2157778f0200d2ede0c0df48fe5df8f14
parent893bf5b0bcfbbe0e6285895cd8b6c8d5ff37fe60
Btrfs: RAID5 and RAID6

This builds on David Woodhouse's original Btrfs raid5/6 implementation.
The code has changed quite a bit, blame Chris Mason for any bugs.

Read/modify/write is done after the higher levels of the filesystem have
prepared a given bio.  This means the higher layers are not responsible
for building full stripes, and they don't need to query for the topology
of the extents that may get allocated during delayed allocation runs.
It also means different files can easily share the same stripe.

But, it does expose us to incorrect parity if we crash or lose power
while doing a read/modify/write cycle.  This will be addressed in a
later commit.

Scrub is unable to repair crc errors on raid5/6 chunks.

Discard does not work on raid5/6 (yet)

The stripe size is fixed at 64KiB per disk.  This will be tunable
in a later commit.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
15 files changed:
fs/btrfs/Kconfig
fs/btrfs/Makefile
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/raid56.c [new file with mode: 0644]
fs/btrfs/raid56.h [new file with mode: 0644]
fs/btrfs/scrub.c
fs/btrfs/transaction.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h