diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2009-05-20 09:02:28 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2009-05-20 09:02:28 +0200 | 
| commit | 521c180874dae86f675d23c4eade4dba8b1f2cc8 (patch) | |
| tree | 7509303da3a9a1b40a26f6811f321c89cd31737b /fs/jbd2/commit.c | |
| parent | f1a11e0576c7a73d759d05d776692b2b2d37172b (diff) | |
| parent | 64d1304a64477629cb16b75491a77bafe6f86963 (diff) | |
Merge branch 'core/urgent' into core/futexes
Merge reason: this branch was on an pre -rc1 base, merge it up to -rc6+
              to get the latest upstream fixes.
Conflicts:
	kernel/futex.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jbd2/commit.c')
| -rw-r--r-- | fs/jbd2/commit.c | 16 | 
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 4ea72377c7a..0b7d3b8226f 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -138,7 +138,7 @@ static int journal_submit_commit_record(journal_t *journal,  		set_buffer_ordered(bh);  		barrier_done = 1;  	} -	ret = submit_bh(WRITE_SYNC, bh); +	ret = submit_bh(WRITE_SYNC_PLUG, bh);  	if (barrier_done)  		clear_buffer_ordered(bh); @@ -159,7 +159,7 @@ static int journal_submit_commit_record(journal_t *journal,  		lock_buffer(bh);  		set_buffer_uptodate(bh);  		clear_buffer_dirty(bh); -		ret = submit_bh(WRITE_SYNC, bh); +		ret = submit_bh(WRITE_SYNC_PLUG, bh);  	}  	*cbh = bh;  	return ret; @@ -190,7 +190,7 @@ retry:  		set_buffer_uptodate(bh);  		bh->b_end_io = journal_end_buffer_io_sync; -		ret = submit_bh(WRITE_SYNC, bh); +		ret = submit_bh(WRITE_SYNC_PLUG, bh);  		if (ret) {  			unlock_buffer(bh);  			return ret; @@ -402,8 +402,13 @@ void jbd2_journal_commit_transaction(journal_t *journal)  	spin_lock(&journal->j_state_lock);  	commit_transaction->t_state = T_LOCKED; +	/* +	 * Use plugged writes here, since we want to submit several before +	 * we unplug the device. We don't do explicit unplugging in here, +	 * instead we rely on sync_buffer() doing the unplug for us. +	 */  	if (commit_transaction->t_synchronous_commit) -		write_op = WRITE_SYNC; +		write_op = WRITE_SYNC_PLUG;  	stats.u.run.rs_wait = commit_transaction->t_max_wait;  	stats.u.run.rs_locked = jiffies;  	stats.u.run.rs_running = jbd2_time_diff(commit_transaction->t_start, @@ -501,7 +506,8 @@ void jbd2_journal_commit_transaction(journal_t *journal)  	if (err)  		jbd2_journal_abort(journal, err); -	jbd2_journal_write_revoke_records(journal, commit_transaction); +	jbd2_journal_write_revoke_records(journal, commit_transaction, +					  write_op);  	jbd_debug(3, "JBD: commit phase 2\n");  | 
