[sheepdog] [PATCH v3 02/11] sheep: remove local_idx in struct sd_rsp
Liu Yuan
namei.unix at gmail.com
Sat Sep 21 18:12:19 CEST 2013
This field is never used and since it is used internally by dog and sheep, it is
safe to remove it completely from the structure as we currently always have dog
and sheep out of the same repo.
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
include/sheepdog_proto.h | 3 +--
sheep/group.c | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h
index b1a621b..ddc710f 100644
--- a/include/sheepdog_proto.h
+++ b/include/sheepdog_proto.h
@@ -181,8 +181,7 @@ struct sd_rsp {
struct {
uint32_t __pad;
uint32_t nr_nodes;
- uint32_t local_idx;
- uint32_t __reserved;
+ uint32_t __reserved[2];
uint64_t store_size;
uint64_t store_free;
} node;
diff --git a/sheep/group.c b/sheep/group.c
index 899ce32..e721a96 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -183,10 +183,8 @@ int local_get_node_list(const struct sd_req *req, struct sd_rsp *rsp,
sizeof(struct sd_node) * nr_nodes);
rsp->data_length = nr_nodes * sizeof(struct sd_node);
rsp->node.nr_nodes = nr_nodes;
- rsp->node.local_idx = get_node_idx(cur_vinfo, &sys->this_node);
} else {
rsp->node.nr_nodes = 0;
- rsp->node.local_idx = 0;
}
return SD_RES_SUCCESS;
--
1.7.9.5
More information about the sheepdog
mailing list