Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251743
b: refs/heads/master
c: 28e35e4
h: refs/heads/master
i:
  251741: da4ff60
  251739: f3bf1b9
  251735: ecd70a0
  251727: 3631817
  251711: 5fae483
v: v3
  • Loading branch information
Tao Ma authored and Theodore Ts'o committed May 23, 2011
1 parent 38c3c61 commit 0f143c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6d2f6b327ceef5c689581529a852dc6ec3b74a6
refs/heads/master: 28e35e42fb255cbaeee8b9f89643f26fe376374d
10 changes: 5 additions & 5 deletions trunk/fs/jbd2/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand All @@ -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",
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0f143c6

Please sign in to comment.