From c9239db7961afd648f1fa3310e5ce9b8281c8ad2 Mon Sep 17 00:00:00 2001 From: Poornima G Date: Tue, 15 Mar 2016 03:14:16 -0400 Subject: inode: Add per xlator ref count for inode Debugging inode ref leaks is very difficult as there is no info except for the ref count on the inode. Hence this patch is first step towards debugging inode ref leaks. With this patch, in the statedump we get additional info that tells the ref count taken by each xlator on the inode. Change-Id: I7802f7e7b13c04eb4d41fdf52d5469fd2c2a185a BUG: 1325531 Signed-off-by: Poornima G Reviewed-on: http://review.gluster.org/13736 CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri Smoke: Gluster Build System --- doc/debugging/statedump.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/debugging/statedump.md b/doc/debugging/statedump.md index f34a5c3436a..18437f1144c 100644 --- a/doc/debugging/statedump.md +++ b/doc/debugging/statedump.md @@ -215,6 +215,7 @@ nlookup=13 #Number of times lookups happened from the client or from fuse kernel fd-count=4 #Number of fds opened on the inode ref=11 #Number of refs taken on the inode ia_type=1 #Type of the inode. This should be changed to some string :-( +Ref by xl:.patchy-md-cache=11 #Further this there will be a list of xlators, and the ref count taken by each of them on this inode at the time of statedump [conn.1.bound_xl./data/brick01a/homegfs.lru.1] #1st inode in lru list. Note that ref count is zero for these inodes. gfid=5114574e-69bc-412b-9e52-f13ff087c6fc @@ -222,6 +223,8 @@ nlookup=5 fd-count=0 ref=0 ia_type=2 +Ref by xl:.fuse=1 +Ref by xl:.patchy-client-0=-1 ``` ###Inode context For each inode per xlator some context could be stored. This context can also be printed in the statedump. Here is the inode ctx of locks xlator -- cgit