diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 16:23:48 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-11 16:23:48 -0400 |
| commit | fd048088306656824958e7783ffcee27e241b361 (patch) | |
| tree | be11bebe3bbd2cac88ff27bd3c7450339d21bdc7 /fs/jbd2/commit.c | |
| parent | 5c3c4d9b5810c9aabd8c05219c62ca088aa83eb0 (diff) | |
| parent | 03010a3350301baac2154fa66de925ae2981b7e3 (diff) | |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (43 commits)
ext4: Rename ext4dev to ext4
ext4: Avoid double dirtying of super block in ext4_put_super()
Update ext4 MAINTAINERS file
Hook ext4 to the vfs fiemap interface.
generic block based fiemap implementation
ocfs2: fiemap support
vfs: vfs-level fiemap interface
ext4: fix xattr deadlock
jbd2: Fix buffer head leak when writing the commit block
ext4: Add debugging markers that can be used by systemtap
jbd2: abort instead of waiting for nonexistent transaction
ext4: fix initialization of UNINIT bitmap blocks
ext4: Remove old legacy block allocator
ext4: Use readahead when reading an inode from the inode table
ext4: Improve the documentation for ext4's /proc tunables
ext4: Combine proc file handling into a single set of functions
ext4: move /proc setup and teardown out of mballoc.c
ext4: Don't use 'struct dentry' for internal lookups
ext4/jbd2: Avoid WARN() messages when failing to write to the superblock
ext4: use percpu data structures for lg_prealloc_list
...
Diffstat (limited to 'fs/jbd2/commit.c')
| -rw-r--r-- | fs/jbd2/commit.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index f2ad061e95ec..0d3814a35ed1 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/time.h> | 16 | #include <linux/time.h> |
| 17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
| 18 | #include <linux/jbd2.h> | 18 | #include <linux/jbd2.h> |
| 19 | #include <linux/marker.h> | ||
| 19 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
| 20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
| 21 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
| @@ -126,8 +127,7 @@ static int journal_submit_commit_record(journal_t *journal, | |||
| 126 | 127 | ||
| 127 | JBUFFER_TRACE(descriptor, "submit commit block"); | 128 | JBUFFER_TRACE(descriptor, "submit commit block"); |
| 128 | lock_buffer(bh); | 129 | lock_buffer(bh); |
| 129 | get_bh(bh); | 130 | clear_buffer_dirty(bh); |
| 130 | set_buffer_dirty(bh); | ||
| 131 | set_buffer_uptodate(bh); | 131 | set_buffer_uptodate(bh); |
| 132 | bh->b_end_io = journal_end_buffer_io_sync; | 132 | bh->b_end_io = journal_end_buffer_io_sync; |
| 133 | 133 | ||
| @@ -147,12 +147,9 @@ static int journal_submit_commit_record(journal_t *journal, | |||
| 147 | * to remember if we sent a barrier request | 147 | * to remember if we sent a barrier request |
| 148 | */ | 148 | */ |
| 149 | if (ret == -EOPNOTSUPP && barrier_done) { | 149 | if (ret == -EOPNOTSUPP && barrier_done) { |
| 150 | char b[BDEVNAME_SIZE]; | ||
| 151 | |||
| 152 | printk(KERN_WARNING | 150 | printk(KERN_WARNING |
| 153 | "JBD: barrier-based sync failed on %s - " | 151 | "JBD: barrier-based sync failed on %s - " |
| 154 | "disabling barriers\n", | 152 | "disabling barriers\n", journal->j_devname); |
| 155 | bdevname(journal->j_dev, b)); | ||
| 156 | spin_lock(&journal->j_state_lock); | 153 | spin_lock(&journal->j_state_lock); |
| 157 | journal->j_flags &= ~JBD2_BARRIER; | 154 | journal->j_flags &= ~JBD2_BARRIER; |
| 158 | spin_unlock(&journal->j_state_lock); | 155 | spin_unlock(&journal->j_state_lock); |
| @@ -160,7 +157,7 @@ static int journal_submit_commit_record(journal_t *journal, | |||
| 160 | /* And try again, without the barrier */ | 157 | /* And try again, without the barrier */ |
| 161 | lock_buffer(bh); | 158 | lock_buffer(bh); |
| 162 | set_buffer_uptodate(bh); | 159 | set_buffer_uptodate(bh); |
| 163 | set_buffer_dirty(bh); | 160 | clear_buffer_dirty(bh); |
| 164 | ret = submit_bh(WRITE, bh); | 161 | ret = submit_bh(WRITE, bh); |
| 165 | } | 162 | } |
| 166 | *cbh = bh; | 163 | *cbh = bh; |
| @@ -371,6 +368,8 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 371 | commit_transaction = journal->j_running_transaction; | 368 | commit_transaction = journal->j_running_transaction; |
| 372 | J_ASSERT(commit_transaction->t_state == T_RUNNING); | 369 | J_ASSERT(commit_transaction->t_state == T_RUNNING); |
| 373 | 370 | ||
| 371 | trace_mark(jbd2_start_commit, "dev %s transaction %d", | ||
| 372 | journal->j_devname, commit_transaction->t_tid); | ||
| 374 | jbd_debug(1, "JBD: starting commit of transaction %d\n", | 373 | jbd_debug(1, "JBD: starting commit of transaction %d\n", |
| 375 | commit_transaction->t_tid); | 374 | commit_transaction->t_tid); |
| 376 | 375 | ||
| @@ -681,11 +680,9 @@ start_journal_io: | |||
| 681 | */ | 680 | */ |
| 682 | err = journal_finish_inode_data_buffers(journal, commit_transaction); | 681 | err = journal_finish_inode_data_buffers(journal, commit_transaction); |
| 683 | if (err) { | 682 | if (err) { |
| 684 | char b[BDEVNAME_SIZE]; | ||
| 685 | |||
| 686 | printk(KERN_WARNING | 683 | printk(KERN_WARNING |
| 687 | "JBD2: Detected IO errors while flushing file data " | 684 | "JBD2: Detected IO errors while flushing file data " |
| 688 | "on %s\n", bdevname(journal->j_fs_dev, b)); | 685 | "on %s\n", journal->j_devname); |
| 689 | err = 0; | 686 | err = 0; |
| 690 | } | 687 | } |
| 691 | 688 | ||
| @@ -990,6 +987,9 @@ restart_loop: | |||
| 990 | } | 987 | } |
| 991 | spin_unlock(&journal->j_list_lock); | 988 | spin_unlock(&journal->j_list_lock); |
| 992 | 989 | ||
| 990 | trace_mark(jbd2_end_commit, "dev %s transaction %d head %d", | ||
| 991 | journal->j_devname, commit_transaction->t_tid, | ||
| 992 | journal->j_tail_sequence); | ||
| 993 | jbd_debug(1, "JBD: commit %d complete, head %d\n", | 993 | jbd_debug(1, "JBD: commit %d complete, head %d\n", |
| 994 | journal->j_commit_sequence, journal->j_tail_sequence); | 994 | journal->j_commit_sequence, journal->j_tail_sequence); |
| 995 | 995 | ||
