summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota/src/quota.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2020-08-07 15:18:21 +0300
committerAmar Tumballi <amar@kadalu.io>2020-08-24 09:49:13 +0000
commit8af9d83804b50a6b6b131dc62c16def7026ca8ed (patch)
tree6509103c96fd13d2e222ae28091e98595bac41e4 /xlators/features/quota/src/quota.h
parentfb54f382e19b2bead226184b0f505eb6900991cf (diff)
features/quota: 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 quota_timeout() to static as well. Change-Id: I0e042cdd759dd9fca25fcf8bc780e5fc4934f7e1 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
Diffstat (limited to 'xlators/features/quota/src/quota.h')
-rw-r--r--xlators/features/quota/src/quota.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h
index 8a3dc7a77f5..0395d78c9ef 100644
--- a/xlators/features/quota/src/quota.h
+++ b/xlators/features/quota/src/quota.h
@@ -153,8 +153,8 @@ struct quota_inode_ctx {
int64_t object_soft_lim;
struct iatt buf;
struct list_head parents;
- struct timeval tv;
- struct timeval prev_log;
+ time_t validate_time;
+ time_t prev_log_time;
gf_boolean_t ancestry_built;
gf_lock_t lock;
};
@@ -199,6 +199,7 @@ struct quota_local {
typedef struct quota_local quota_local_t;
struct quota_priv {
+ /* FIXME: consider time_t for timeouts. */
uint32_t soft_timeout;
uint32_t hard_timeout;
uint32_t log_timeout;