From 6c848529cb26e6e4a5dc9576283207ab72187974 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Sat, 16 Feb 2013 20:10:24 +0530 Subject: libglusterfs: Fix memory leaks in fd_lk_insert_and_merge Change-Id: I666664895fdd7c7199797796819e652557a7ac99 BUG: 834465 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/4525 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/volume.rc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/volume.rc') diff --git a/tests/volume.rc b/tests/volume.rc index fe4d8306..9debe2b9 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -39,11 +39,17 @@ function get_mount_process_pid { ps aux | grep glusterfs | grep -E "volfile-id[ =]/?$vol " | awk '{print $2}' | head -1 } +function cleanup_statedump { + pid=$1 + rm -f $statedumpdir/*$pid.dump.* + #.vimrc friendly comment */ +} + function generate_statedump { local fpath="" pid=$1 #remove old stale statedumps - rm -f $statedumpdir/*$pid.dump.* + cleanup_statedump $pid kill -USR1 $pid #Wait till the statedump is generated sleep 1 @@ -56,6 +62,11 @@ function generate_mount_statedump { generate_statedump $(get_mount_process_pid $vol) } +function cleanup_mount_statedump { + local vol=$1 + cleanup_statedump $(get_mount_process_pid $vol) +} + function _afr_child_up_status { local vol=$1 #brick_id is (brick-num in volume info - 1) -- cgit