diff options
author | Mohit Agrawal <moagrawal@redhat.com> | 2018-10-10 10:31:18 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-10-12 15:22:36 +0000 |
commit | 7bf95631b52bd05b06122180f8bd4aa62c70b1a9 (patch) | |
tree | bce80fea2f576bdeea789a0b2dd83335d69953d7 /xlators/performance/io-threads/src/io-threads.h | |
parent | 777412c5e8a1e8613061fef31bd8a60d4cd54b6e (diff) |
core: glusterfsd keeping fd open in index xlator
Problem: At the time of processing GF_EVENT_PARENT_DOWN
at brick xlator, it forwards the event to next xlator
only while xlator ensures no stub is in progress.
At io-thread xlator it decreases stub_cnt before the process
a stub and notify EVENT to next xlator
Solution: Introduce a new counter to save stub_cnt and decrease
the counter after process the stub completely at io-thread
xlator.
To avoid brick crash at the time of call xlator_mem_cleanup
move only brick xlator if detach brick name has found in
the graph
Note: Thanks to pranith for sharing a simple reproducer to
reproduce the same
fixes bz#1637934
Change-Id: I1a694a001f7a5417e8771e3adf92c518969b6baa
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Diffstat (limited to 'xlators/performance/io-threads/src/io-threads.h')
-rw-r--r-- | xlators/performance/io-threads/src/io-threads.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.h b/xlators/performance/io-threads/src/io-threads.h index f80fd41c45d..2980d18e74b 100644 --- a/xlators/performance/io-threads/src/io-threads.h +++ b/xlators/performance/io-threads/src/io-threads.h @@ -63,7 +63,8 @@ struct iot_conf { int32_t ac_iot_limit[GF_FOP_PRI_MAX]; int32_t ac_iot_count[GF_FOP_PRI_MAX]; int queue_sizes[GF_FOP_PRI_MAX]; - gf_atomic_t queue_size; + int32_t queue_size; + gf_atomic_t stub_cnt; pthread_attr_t w_attr; gf_boolean_t least_priority; /*Enable/Disable least-priority */ |