diff options
author | Liu Yuan <namei.unix@gmail.com> | 2013-11-07 22:56:38 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-11-29 13:40:37 +0100 |
commit | b3af018f3babfe7a0328759a86c00a6a6b4f6443 (patch) | |
tree | 6dcc6aaa9827c8b2eeb8c54d6d96736d509bcc8a /include/block/block_int.h | |
parent | c31d482f29ffe4ba54065acfb2f31c3f4ce586b7 (diff) | |
download | hqemu-b3af018f3babfe7a0328759a86c00a6a6b4f6443.zip hqemu-b3af018f3babfe7a0328759a86c00a6a6b4f6443.tar.gz |
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>
Diffstat (limited to 'include/block/block_int.h')
-rw-r--r-- | include/block/block_int.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 3c5e9cb..d0f70c4 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -53,6 +53,7 @@ #define BLOCK_OPT_COMPAT_LEVEL "compat" #define BLOCK_OPT_LAZY_REFCOUNTS "lazy_refcounts" #define BLOCK_OPT_ADAPTER_TYPE "adapter_type" +#define BLOCK_OPT_REDUNDANCY "redundancy" typedef struct BdrvTrackedRequest { BlockDriverState *bs; |