diff options
author | Joseph Qi <joseph.qi@huawei.com> | 2015-02-16 19:00:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-16 20:56:05 -0500 |
commit | 4813962beef7586f890a645a1bda77691da4b74a (patch) | |
tree | 75885da49ee8bc539aa41c6af8395a4f88c2a7d9 /fs/ocfs2/journal.c | |
parent | 3a83b342c87e6d21290de8dc76ec20a67821261d (diff) |
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>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r-- | fs/ocfs2/journal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 9730f5350ef4..ff531928269e 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -2204,6 +2204,8 @@ static int ocfs2_recover_orphans(struct ocfs2_super *osb, | |||
2204 | ret = ocfs2_del_inode_from_orphan(osb, inode, 0, 0); | 2204 | ret = ocfs2_del_inode_from_orphan(osb, inode, 0, 0); |
2205 | if (ret) | 2205 | if (ret) |
2206 | mlog_errno(ret); | 2206 | mlog_errno(ret); |
2207 | |||
2208 | wake_up(&OCFS2_I(inode)->append_dio_wq); | ||
2207 | } /* else if ORPHAN_NO_NEED_TRUNCATE, do nothing */ | 2209 | } /* else if ORPHAN_NO_NEED_TRUNCATE, do nothing */ |
2208 | 2210 | ||
2209 | next: | 2211 | next: |