[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a5c6dd06583fdcce170a96d41cd48c1e61f1a6ce.1646922487.git.riteshh@linux.ibm.com>
Date: Thu, 10 Mar 2022 21:28:58 +0530
From: Ritesh Harjani <riteshh@...ux.ibm.com>
To: linux-ext4@...r.kernel.org
Cc: Jan Kara <jack@...e.cz>, "Theodore Ts'o" <tytso@....edu>,
Harshad Shirwadkar <harshadshirwadkar@...il.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Ritesh Harjani <riteshh@...ux.ibm.com>
Subject: [PATCHv2 04/10] ext4: Do not call FC trace event in ext4_fc_commit() if FS does not support FC
This just puts trace_ext4_fc_commit_start(sb) & ktime_get()
for measuring FC commit time, after the check of whether sb
supports JOURNAL_FAST_COMMIT or not.
Signed-off-by: Ritesh Harjani <riteshh@...ux.ibm.com>
Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@...il.com>
Reviewed-by: Jan Kara <jack@...e.cz>
---
fs/ext4/fast_commit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index 5ac594e03402..55d33f296cae 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -1165,13 +1165,13 @@ int ext4_fc_commit(journal_t *journal, tid_t commit_tid)
int status = EXT4_FC_STATUS_OK, fc_bufs_before = 0;
ktime_t start_time, commit_time;
+ if (!test_opt2(sb, JOURNAL_FAST_COMMIT))
+ return jbd2_complete_transaction(journal, commit_tid);
+
trace_ext4_fc_commit_start(sb);
start_time = ktime_get();
- if (!test_opt2(sb, JOURNAL_FAST_COMMIT))
- return jbd2_complete_transaction(journal, commit_tid);
-
restart_fc:
ret = jbd2_fc_begin_commit(journal, commit_tid);
if (ret == -EALREADY) {
--
2.31.1
Powered by blists - more mailing lists