]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: flush inode data to disk and free inode when i_count becomes zero
authorXue jiufei <xuejiufei@huawei.com>
Fri, 4 Sep 2015 22:44:11 +0000 (15:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2015 23:54:41 +0000 (16:54 -0700)
commit08f1e3a31b351c572486c8a5d1e4c33cd20b9db9
tree8a4ddec9831ae4ce0ff0512eaaab38cc256e4b95
parent26125c651665bc5fabfbf3f7d2d7ff7d70f3a1ee
ocfs2: flush inode data to disk and 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 it hurts the user experience.  So we think the inode should
be freed after the data flushed to disk when i_count becomes zero to
avoid such circumstances.

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