OSDN Git Service

sheepdog: support user-defined redundancy option
authorLiu Yuan <namei.unix@gmail.com>
Thu, 7 Nov 2013 14:56:38 +0000 (22:56 +0800)
committerKevin Wolf <kwolf@redhat.com>
Fri, 29 Nov 2013 12:40:37 +0000 (13:40 +0100)
commitb3af018f3babfe7a0328759a86c00a6a6b4f6443
tree6dcc6aaa9827c8b2eeb8c54d6d96736d509bcc8a
parentc31d482f29ffe4ba54065acfb2f31c3f4ce586b7
sheepdog: support user-defined redundancy option

Sheepdog support two kinds of redundancy, full replication and erasure coding.

# create a fully replicated vdi with x copies
 -o redundancy=x (1 <= x <= SD_MAX_COPIES)

# create a erasure coded vdi with x data strips and y parity strips
 -o redundancy=x:y (x must be one of {2,4,8,16} and 1 <= y < SD_EC_MAX_STRIP)

E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme

$ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/sheepdog.c
include/block/block_int.h