From a42137eee3c9e340ac9c82ebacca14eeb4b9d912 Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 15 Feb 2018 16:12:12 +0530 Subject: features/shard: Fix shard inode refcount when it's part of priv->lru_list. For as long as a shard's inode is in priv->lru_list, it should have a non-zero ref-count. This patch achieves it by taking a ref on the inode when it is added to lru list. When it's time for the inode to be evicted from the lru list, a corresponding unref is done. Change-Id: I289ffb41e7be5df7489c989bc1bbf53377433c86 BUG: 1468483 Signed-off-by: Krutika Dhananjay --- tests/volume.rc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/volume.rc') diff --git a/tests/volume.rc b/tests/volume.rc index 3ee83624058..add812d4779 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -812,3 +812,21 @@ function get_fd_count { rm -f $statedump echo $count } + +function get_mount_active_size_value { + local vol=$1 + local statedump=$(generate_mount_statedump $vol) + sleep 1 + local val=$(grep "active_size" $statedump | cut -f2 -d'=' | tail -1) + rm -f $statedump + echo $val +} + +function get_mount_lru_size_value { + local vol=$1 + local statedump=$(generate_mount_statedump $vol) + sleep 1 + local val=$(grep "lru_size" $statedump | cut -f2 -d'=' | tail -1) + rm -f $statedump + echo $val +} -- cgit