ocfs2: wait for orphan recovery first once append O_DIRECT write crash
authorJoseph Qi <joseph.qi@huawei.com>
Tue, 17 Feb 2015 00:00:12 +0000 (16:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 17 Feb 2015 01:56:05 +0000 (17:56 -0800)
commit4813962beef7586f890a645a1bda77691da4b74a
tree75885da49ee8bc539aa41c6af8395a4f88c2a7d9
parent3a83b342c87e6d21290de8dc76ec20a67821261d
ocfs2: wait for orphan recovery first once append O_DIRECT write crash

If one node has crashed with orphan entry leftover, another node which do
append O_DIRECT write to the same file will override the
i_dio_orphaned_slot.  Then the old entry won't be cleaned forever.  If
this case happens, we let it wait for orphan recovery first.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Weiwei Wang <wangww631@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Xuejiufei <xuejiufei@huawei.com>
Cc: alex chen <alex.chen@huawei.com>
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
fs/ocfs2/namei.c
fs/ocfs2/super.c