summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2018-02-15 16:12:12 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2018-03-02 05:26:00 +0000
commita42137eee3c9e340ac9c82ebacca14eeb4b9d912 (patch)
tree19e2f5cbc589acc298cd0ee49d0675411b502947 /tests/volume.rc
parente7b79c59590c203c65f7ac8548b30d068c232d33 (diff)
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 <kdhananj@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc18
1 files changed, 18 insertions, 0 deletions
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
+}