commit.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) | commit.c (721a9602e6607417c6bc15b18e97a2f35266c690) |
---|---|
1/* 2 * linux/fs/jbd2/commit.c 3 * 4 * Written by Stephen C. Tweedie <sct@redhat.com>, 1998 5 * 6 * Copyright 1998 Red Hat corp --- All Rights Reserved 7 * 8 * This file is part of the Linux kernel and is made available under --- 123 unchanged lines hidden (view full) --- 132 lock_buffer(bh); 133 clear_buffer_dirty(bh); 134 set_buffer_uptodate(bh); 135 bh->b_end_io = journal_end_buffer_io_sync; 136 137 if (journal->j_flags & JBD2_BARRIER && 138 !JBD2_HAS_INCOMPAT_FEATURE(journal, 139 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)) | 1/* 2 * linux/fs/jbd2/commit.c 3 * 4 * Written by Stephen C. Tweedie <sct@redhat.com>, 1998 5 * 6 * Copyright 1998 Red Hat corp --- All Rights Reserved 7 * 8 * This file is part of the Linux kernel and is made available under --- 123 unchanged lines hidden (view full) --- 132 lock_buffer(bh); 133 clear_buffer_dirty(bh); 134 set_buffer_uptodate(bh); 135 bh->b_end_io = journal_end_buffer_io_sync; 136 137 if (journal->j_flags & JBD2_BARRIER && 138 !JBD2_HAS_INCOMPAT_FEATURE(journal, 139 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)) |
140 ret = submit_bh(WRITE_SYNC_PLUG | WRITE_FLUSH_FUA, bh); | 140 ret = submit_bh(WRITE_SYNC | WRITE_FLUSH_FUA, bh); |
141 else | 141 else |
142 ret = submit_bh(WRITE_SYNC_PLUG, bh); | 142 ret = submit_bh(WRITE_SYNC, bh); |
143 144 *cbh = bh; 145 return ret; 146} 147 148/* 149 * This function along with journal_submit_commit_record 150 * allows to write the commit record asynchronously. --- 213 unchanged lines hidden (view full) --- 364 commit_transaction->t_state = T_LOCKED; 365 366 /* 367 * Use plugged writes here, since we want to submit several before 368 * we unplug the device. We don't do explicit unplugging in here, 369 * instead we rely on sync_buffer() doing the unplug for us. 370 */ 371 if (commit_transaction->t_synchronous_commit) | 143 144 *cbh = bh; 145 return ret; 146} 147 148/* 149 * This function along with journal_submit_commit_record 150 * allows to write the commit record asynchronously. --- 213 unchanged lines hidden (view full) --- 364 commit_transaction->t_state = T_LOCKED; 365 366 /* 367 * Use plugged writes here, since we want to submit several before 368 * we unplug the device. We don't do explicit unplugging in here, 369 * instead we rely on sync_buffer() doing the unplug for us. 370 */ 371 if (commit_transaction->t_synchronous_commit) |
372 write_op = WRITE_SYNC_PLUG; | 372 write_op = WRITE_SYNC; |
373 trace_jbd2_commit_locking(journal, commit_transaction); 374 stats.run.rs_wait = commit_transaction->t_max_wait; 375 stats.run.rs_locked = jiffies; 376 stats.run.rs_running = jbd2_time_diff(commit_transaction->t_start, 377 stats.run.rs_locked); 378 379 spin_lock(&commit_transaction->t_handle_lock); 380 while (atomic_read(&commit_transaction->t_updates)) { --- 657 unchanged lines hidden --- | 373 trace_jbd2_commit_locking(journal, commit_transaction); 374 stats.run.rs_wait = commit_transaction->t_max_wait; 375 stats.run.rs_locked = jiffies; 376 stats.run.rs_running = jbd2_time_diff(commit_transaction->t_start, 377 stats.run.rs_locked); 378 379 spin_lock(&commit_transaction->t_handle_lock); 380 while (atomic_read(&commit_transaction->t_updates)) { --- 657 unchanged lines hidden --- |