From 0f143c6978edbe2339b89f8503fb6fcfde70b89d Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Sun, 22 May 2011 21:45:26 -0400 Subject: [PATCH] --- yaml --- r: 251743 b: refs/heads/master c: 28e35e42fb255cbaeee8b9f89643f26fe376374d h: refs/heads/master i: 251741: da4ff602f405703aeae35acdd776d71cc535b6f5 251739: f3bf1b9bb8bbe742887455f9e1d39c3fb5288acd 251735: ecd70a0f691b086c1d20eda3d7aae859ad5a4247 251727: 36318172464165a4bc5a6c6c6a12aab86d39190e 251711: 5fae483e4dcba948dc8844081719c61276ab765c v: v3 --- [refs] | 2 +- trunk/fs/jbd2/transaction.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index ee6845086dc1..bc72790d2264 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f6d2f6b327ceef5c689581529a852dc6ec3b74a6 +refs/heads/master: 28e35e42fb255cbaeee8b9f89643f26fe376374d diff --git a/trunk/fs/jbd2/transaction.c b/trunk/fs/jbd2/transaction.c index 05fa77a23711..85a055ef93fe 100644 --- a/trunk/fs/jbd2/transaction.c +++ b/trunk/fs/jbd2/transaction.c @@ -82,7 +82,7 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction) */ /* - * Update transiaction's maximum wait time, if debugging is enabled. + * Update transaction's maximum wait time, if debugging is enabled. * * In order for t_max_wait to be reliable, it must be protected by a * lock. But doing so will mean that start_this_handle() can not be @@ -91,11 +91,10 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction) * means that maximum wait time reported by the jbd2_run_stats * tracepoint will always be zero. */ -static inline void update_t_max_wait(transaction_t *transaction) +static inline void update_t_max_wait(transaction_t *transaction, + unsigned long ts) { #ifdef CONFIG_JBD2_DEBUG - unsigned long ts = jiffies; - if (jbd2_journal_enable_debug && time_after(transaction->t_start, ts)) { ts = jbd2_time_diff(ts, transaction->t_start); @@ -121,6 +120,7 @@ static int start_this_handle(journal_t *journal, handle_t *handle, tid_t tid; int needed, need_to_start; int nblocks = handle->h_buffer_credits; + unsigned long ts = jiffies; if (nblocks > journal->j_max_transaction_buffers) { printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n", @@ -271,7 +271,7 @@ static int start_this_handle(journal_t *journal, handle_t *handle, /* OK, account for the buffers that this operation expects to * use and add the handle to the running transaction. */ - update_t_max_wait(transaction); + update_t_max_wait(transaction, ts); handle->h_transaction = transaction; atomic_inc(&transaction->t_updates); atomic_inc(&transaction->t_handle_count);