Because the purpose is to get the copy policy and the number of
copies only, reading the latest epoch is nice. No need to read
all epoch records.

Signed-off-by: Ruoyu <lian...@ucweb.com>
---
 dog/cluster.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dog/cluster.c b/dog/cluster.c
index 3d7cd32..ba44ad9 100644
--- a/dog/cluster.c
+++ b/dog/cluster.c
@@ -605,7 +605,7 @@ static int cluster_alter_copy(int argc, char **argv)
                confirm(info);
        }
 
-       log_length = sd_epoch * sizeof(struct epoch_log);
+       log_length = sizeof(struct epoch_log);
        logs = xmalloc(log_length);
        sd_init_req(&hdr, SD_OP_STAT_CLUSTER);
        hdr.data_length = log_length;
-- 
1.8.3.2


-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to