diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2020-08-10 13:01:33 +0300 |
---|---|---|
committer | Amar Tumballi <amar@kadalu.io> | 2020-08-21 14:06:30 +0000 |
commit | be20c051a14a15738c3bcab71698e60895e1baba (patch) | |
tree | c728fb266cd83e99fc1088f9f7016a19004aac83 /xlators/performance/io-cache/src/io-cache.h | |
parent | a2ffb748da24b2e9d6f5e98d21ef78d1a17d31cb (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.h | 16 |
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 { |