The number of copies is used when forwarding requests Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> --- block/sheepdog.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 5dd8fcd..ec5c16b 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -1090,7 +1090,6 @@ static int add_aio_request(struct bdrv_sd_state *s, struct sd_aiocb *acb, } else if (create) { wlen = datalen; hdr.opcode = SD_OP_CREATE_AND_WRITE_OBJ; - hdr.copies = s->inode.nr_copies; hdr.flags = SD_FLAG_CMD_WRITE | flags; } else { wlen = datalen; @@ -1098,6 +1097,7 @@ static int add_aio_request(struct bdrv_sd_state *s, struct sd_aiocb *acb, hdr.flags = SD_FLAG_CMD_WRITE | flags; } + hdr.copies = s->inode.nr_copies; hdr.oid = oid; hdr.cow_oid = old_oid; @@ -1153,6 +1153,8 @@ static int read_vdi_obj(char *buf, uint64_t oid, hdr.epoch = s_epoch; hdr.opcode = SD_OP_READ_OBJ; hdr.oid = oid; + /* TODO: use ANAME_COPIES in the vdi directory */ + hdr.copies = 3; hdr.data_length = rlen; sidx = obj_to_sheep(e, nr, oid, i); -- 1.6.5 |