aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2_trace.h
diff options
context:
space:
mode:
authorGang He <ghe@suse.com>2019-03-05 15:41:45 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-05 21:07:13 -0800
commit5500ab4ed3b8f0749ec584d8c5e2738bc01ea52e (patch)
tree9d7d80510e0cef57c6e2fa117985e2c570e27c71 /fs/ocfs2/ocfs2_trace.h
parentocfs2: fix a panic problem caused by o2cb_ctl (diff)
downloadlinux-dev-5500ab4ed3b8f0749ec584d8c5e2738bc01ea52e.tar.xz
linux-dev-5500ab4ed3b8f0749ec584d8c5e2738bc01ea52e.zip
ocfs2: fix the application IO timeout when fstrim is running
The user reported this problem, the upper application IO was timeout when fstrim was running on this ocfs2 partition. the application monitoring resource agent considered that this application did not work, then this node was fenced by the cluster brain (e.g. pacemaker). The root cause is that fstrim thread always holds main_bm meta-file related locks until all the cluster groups are trimmed. This patch will make fstrim thread release main_bm meta-file related locks when each cluster group is trimmed, this will let the current application IO has a chance to claim the clusters from main_bm meta-file. Link: http://lkml.kernel.org/r/20190111090014.31645-1-ghe@suse.com Signed-off-by: Gang He <ghe@suse.com> Reviewed-by: Changwei Ge <ge.changwei@h3c.com> Cc: Mark Fasheh <mfasheh@versity.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <joseph.qi@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/ocfs2_trace.h')
-rw-r--r--fs/ocfs2/ocfs2_trace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
index 2ee76a90ba8f..dc4bce1649c1 100644
--- a/fs/ocfs2/ocfs2_trace.h
+++ b/fs/ocfs2/ocfs2_trace.h
@@ -712,6 +712,8 @@ TRACE_EVENT(ocfs2_trim_extent,
DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_trim_group);
+DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_trim_mainbm);
+
DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_trim_fs);
/* End of trace events for fs/ocfs2/alloc.c. */