ocfs2: only take lock if dio entry when recover orphans
authorJoseph Qi <joseph.qi@huawei.com>
Fri, 6 Nov 2015 02:44:04 +0000 (18:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
commit93d911fcce259a3f950ee20592beee31b855cd96
treedb5a232a287f08ae5eb1d750562b60986c81f1ab
parent30edc43c7ff0760f6896c37c06a84533546588fa
ocfs2: only take lock if dio entry when recover orphans

We have no need to take inode mutex, rw and inode lock if it is not dio
entry when recover orphans.  Optimize it by adding a flag
OCFS2_INODE_DIO_ORPHAN_ENTRY to ocfs2_inode_info to reduce contention.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/inode.h
fs/ocfs2/journal.c