diff options
author | Zhang Huan <zhanghuan@open-fs.com> | 2018-01-09 16:58:22 +0800 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2018-01-15 05:08:28 +0000 |
commit | 0f653fe4fb3a654af65fda736fa23cf0ec9f741c (patch) | |
tree | f851488dfbb5fef44e97dde0ca1d12ab4efd6b70 /xlators/performance/readdir-ahead/src/readdir-ahead.h | |
parent | ba149bac92d169ae2256dbc75202dc9e5d06538e (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.h | 2 |
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 */ |