Signed-off-by: Liu Yuan <namei.unix at gmail.com> --- sheep/config.c | 4 ++-- sheep/sheep_priv.h | 4 ++-- sheep/store.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sheep/config.c b/sheep/config.c index aa84b96..20ddbf2 100644 --- a/sheep/config.c +++ b/sheep/config.c @@ -185,14 +185,14 @@ int get_cluster_store(char *buf) return SD_RES_SUCCESS; } -int set_cluster_space(uint64_t space) +int set_node_space(uint64_t space) { config.space = space; return write_config(); } -int get_cluster_space(uint64_t *space) +int get_node_space(uint64_t *space) { *space = config.space; diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h index f987238..f3fb09e 100644 --- a/sheep/sheep_priv.h +++ b/sheep/sheep_priv.h @@ -278,8 +278,8 @@ int set_cluster_flags(uint16_t flags); int get_cluster_flags(uint16_t *flags); int set_cluster_store(const char *name); int get_cluster_store(char *buf); -int set_cluster_space(uint64_t space); -int get_cluster_space(uint64_t *space); +int set_node_space(uint64_t space); +int get_node_space(uint64_t *space); int store_file_write(void *buffer, size_t len); void *store_file_read(void); diff --git a/sheep/store.c b/sheep/store.c index 242cbc3..ea2cfb0 100644 --- a/sheep/store.c +++ b/sheep/store.c @@ -362,7 +362,7 @@ int init_disk_space(const char *base_path) mds = md_init_space(); /* If it is restarted */ - ret = get_cluster_space(&space_size); + ret = get_node_space(&space_size); if (space_size != 0) { sys->disk_space = space_size; goto out; @@ -370,7 +370,7 @@ int init_disk_space(const char *base_path) /* User has specified the space at startup */ if (sys->disk_space) { - ret = set_cluster_space(sys->disk_space); + ret = set_node_space(sys->disk_space); goto out; } @@ -386,7 +386,7 @@ int init_disk_space(const char *base_path) sys->disk_space = (uint64_t)fs.f_frsize * fs.f_bfree; } - ret = set_cluster_space(sys->disk_space); + ret = set_node_space(sys->disk_space); out: sd_dprintf("disk free space is %" PRIu64, sys->disk_space); return ret; -- 1.7.9.5 |