summaryrefslogtreecommitdiffstats
path: root/xlators/performance/readdir-ahead/src/readdir-ahead.h
diff options
context:
space:
mode:
authorZhang Huan <zhanghuan@open-fs.com>2018-01-09 16:58:22 +0800
committerRaghavendra G <rgowdapp@redhat.com>2018-01-15 05:08:28 +0000
commit0f653fe4fb3a654af65fda736fa23cf0ec9f741c (patch)
treef851488dfbb5fef44e97dde0ca1d12ab4efd6b70 /xlators/performance/readdir-ahead/src/readdir-ahead.h
parentba149bac92d169ae2256dbc75202dc9e5d06538e (diff)
performance/readdir-ahead: fix cache usage update issue
Use atomic operation to modify cache-size to protect it from concurrent modification. Change-Id: Ie73cdd4abbaf0232b1db4ac856c01d24603890ad BUG: 1533804 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
Diffstat (limited to 'xlators/performance/readdir-ahead/src/readdir-ahead.h')
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.h b/xlators/performance/readdir-ahead/src/readdir-ahead.h
index 8c663e091f1..dda1a69246c 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.h
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.h
@@ -44,7 +44,7 @@ struct rda_priv {
uint64_t rda_low_wmark;
uint64_t rda_high_wmark;
uint64_t rda_cache_limit;
- uint64_t rda_cache_size;
+ gf_atomic_t rda_cache_size;
};
#endif /* __READDIR_AHEAD_H */