From c048df835e94a8707254d32db93c42f43f31abda Mon Sep 17 00:00:00 2001 From: Barak Sason Rofman Date: Wed, 18 Dec 2019 19:18:40 +0200 Subject: dht - Reducing methods scope 1. Reduced methods scope in the following: inode read&write, layout, linkfile, shard 2. Removed dead code @ dht-linkkile.c:174-228 & dht-shard.c:44 Change-Id: I2d08a10c7b074fccdb0c020845cad60c6ea32db5 updates: bz#1193929 Signed-off-by: Barak Sason Rofman --- xlators/cluster/dht/src/dht-layout.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'xlators/cluster/dht/src/dht-layout.c') diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c index f2bc63d494c..fda904c92c9 100644 --- a/xlators/cluster/dht/src/dht-layout.c +++ b/xlators/cluster/dht/src/dht-layout.c @@ -254,7 +254,7 @@ dht_disk_layout_extract_for_subvol(xlator_t *this, dht_layout_t *layout, return dht_disk_layout_extract(this, layout, i, disk_layout_p); } -int +static int dht_disk_layout_merge(xlator_t *this, dht_layout_t *layout, int pos, void *disk_layout_raw, int disk_layout_len) { @@ -412,8 +412,7 @@ dht_layout_range_swap(dht_layout_t *layout, int i, int j) layout->list[j].start = start_swap; layout->list[j].stop = stop_swap; } - -int64_t +static int64_t dht_layout_entry_cmp_volname(dht_layout_t *layout, int i, int j) { return (strcmp(layout->list[i].xlator->name, layout->list[j].xlator->name)); @@ -436,7 +435,7 @@ dht_is_subvol_in_layout(dht_layout_t *layout, xlator_t *xlator) return _gf_false; } -int64_t +static int64_t dht_layout_entry_cmp(dht_layout_t *layout, int i, int j) { int64_t diff = 0; @@ -472,7 +471,7 @@ dht_layout_sort(dht_layout_t *layout) return 0; } -int +void dht_layout_sort_volname(dht_layout_t *layout) { int i = 0; @@ -488,8 +487,6 @@ dht_layout_sort_volname(dht_layout_t *layout) dht_layout_entry_swap(layout, i, j); } } - - return 0; } void -- cgit