summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache/src/io-cache.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2020-08-10 13:01:33 +0300
committerAmar Tumballi <amar@kadalu.io>2020-08-21 14:06:30 +0000
commitbe20c051a14a15738c3bcab71698e60895e1baba (patch)
treec728fb266cd83e99fc1088f9f7016a19004aac83 /xlators/performance/io-cache/src/io-cache.h
parenta2ffb748da24b2e9d6f5e98d21ef78d1a17d31cb (diff)
performance/io-cache: simplify and cleanup internal time management
Since this xlator measures time intervals in seconds, gettimeofday() may be replaced with simpler gf_time(). Simplify and convert to static ioc_inode_need_revalidate() as well. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Change-Id: Iaf13ecbf527589286ab3331c37429dd04bf6fa2c Updates: #1002
Diffstat (limited to 'xlators/performance/io-cache/src/io-cache.h')
-rw-r--r--xlators/performance/io-cache/src/io-cache.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.h b/xlators/performance/io-cache/src/io-cache.h
index 4303c2fae13..7ba7f3a3a28 100644
--- a/xlators/performance/io-cache/src/io-cache.h
+++ b/xlators/performance/io-cache/src/io-cache.h
@@ -117,15 +117,13 @@ struct ioc_page {
struct ioc_cache {
rbthash_table_t *page_table;
struct list_head page_lru;
- time_t mtime; /*
- * seconds component of file mtime
- */
- time_t mtime_nsec; /*
- * nanosecond component of file mtime
- */
- struct timeval tv; /*
- * time-stamp at last re-validate
- */
+ time_t mtime; /*
+ * seconds component of file mtime
+ */
+ time_t mtime_nsec; /*
+ * nanosecond component of file mtime
+ */
+ time_t last_revalidate; /* timestamp at last re-validate */
};
struct ioc_inode {