summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2020-08-11 11:44:18 +0300
committerAmar Tumballi <amar@kadalu.io>2020-08-21 14:05:26 +0000
commitac98f64a9be9cb2374e9cf124b03cc5bf791e81d (patch)
tree115945a6aba56a4bcd5612f21b77759a8914a2f3 /xlators/cluster/dht/src/dht-common.h
parent9bca9a0b42f888cb88cedc848d471dd32a6f62d0 (diff)
cluster/dht: simplify and cleanup internal time management
Prefer time_t and gf_time() over 'struct timeval' and gettimeofday() where microseconds are not really used, drop unneeded 'struct timeval' to 'struct timespec' conversion in dht_file_counter_thread(). Change-Id: Ibd802f79b8848df3f6175ca1fd82e93532bba38d Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 84891406c71..e3fb434e516 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -559,7 +559,7 @@ struct gf_defrag_info_ {
int cmd;
inode_t *root_inode;
uuid_t node_uuid;
- struct timeval start_time;
+ time_t start_time;
uint32_t new_commit_hash;
gf_defrag_status_t defrag_status;
gf_defrag_pattern_list_t *defrag_pattern;
@@ -635,7 +635,7 @@ struct dht_conf {
int subvolume_cnt;
int32_t refresh_interval;
gf_lock_t subvolume_lock;
- struct timeval last_stat_fetch;
+ time_t last_stat_fetch;
gf_lock_t layout_lock;
dict_t *leaf_to_subvol;
void *private; /* Can be used by wrapper xlators over