summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-data.h
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2019-04-12 13:40:59 +0200
committerXavi Hernandez <xhernandez@redhat.com>2019-04-23 13:53:02 +0200
commitab6c9ff91a56e38ca80b0ff855f3aeafefd99fbb (patch)
treec85760be973b724ecd6d5951a8317113093fd817 /xlators/cluster/ec/src/ec-data.h
parent5c521d403fbee36df5d44e39090b0030ca57c98b (diff)
core: handle memory accounting correctly
When a translator stops, memory accounting for that translator is not destroyed (because there could remain memory allocated that references it), but mutexes that coordinate updates of memory accounting were destroyed. This caused incorrect memory accounting and even crashes in debug mode. This patch also fixes some other things: * Reduce the number of atomic operations needed to manage memory accounting. * Correctly account memory when realloc() is used. * Merge two critical sections into one. * Cleaned the code a bit. Backport of: > Change-Id: Id5eaee7338729b9bc52c931815ca3ff1e5a7dcc8 > BUG: bz#1659334 > Signed-off-by: Xavi Hernandez <xhernandez@redhat.com> Change-Id: Id5eaee7338729b9bc52c931815ca3ff1e5a7dcc8 Fixes: bz#1702271 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-data.h')
0 files changed, 0 insertions, 0 deletions