]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ocfs2: free inode when i_count becomes zero
authorXue jiufei <xuejiufei@huawei.com>
Thu, 26 Jun 2014 00:42:22 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 26 Jun 2014 00:42:22 +0000 (10:42 +1000)
commit92a640824fe34624104956bc8deaf32847590632
tree6e96766c28e8997cb0ca0b514fdd1982467c03b3
parent4c6d0e4201a12822fe927cddfd357b60e1107b87
ocfs2: free inode when i_count becomes zero

Disk inode deletion may be heavily delayed when one node unlink a file
after the same dentry is freed on another node(say N1) because of memory
shrink but inode is left in memory.  This inode can only be freed while N1
doing the orphan scan work.

However, N1 may skip orphan scan for several times because other nodes may
do the work earlier.  In our tests, it may take 1 hour on 4 nodes cluster
and this will cause bad user experience.  So we think the inode should be
freed when i_count becomes zero to avoid such circumstances.

Signed-off-by: joyce.xue <xuejiufei@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/inode.c