Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107536
b: refs/heads/master
c: e9e34f4
h: refs/heads/master
v: v3
  • Loading branch information
Hidehiro Kawai authored and Theodore Ts'o committed Aug 1, 2008
1 parent ab13dc5 commit 47f8728
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 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: 9c83a923c67df311c467ec956009f0eb4019195d
refs/heads/master: e9e34f4e8f42177c66754fec1edfd35e70c18f99
24 changes: 20 additions & 4 deletions trunk/fs/jbd2/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,18 @@ static int journal_finish_inode_data_buffers(journal_t *journal,
jinode->i_flags |= JI_COMMIT_RUNNING;
spin_unlock(&journal->j_list_lock);
err = filemap_fdatawait(jinode->i_vfs_inode->i_mapping);
if (!ret)
ret = err;
if (err) {
/*
* Because AS_EIO is cleared by
* wait_on_page_writeback_range(), set it again so
* that user process can get -EIO from fsync().
*/
set_bit(AS_EIO,
&jinode->i_vfs_inode->i_mapping->flags);

if (!ret)
ret = err;
}
spin_lock(&journal->j_list_lock);
jinode->i_flags &= ~JI_COMMIT_RUNNING;
wake_up_bit(&jinode->i_flags, __JI_COMMIT_RUNNING);
Expand Down Expand Up @@ -670,8 +680,14 @@ void jbd2_journal_commit_transaction(journal_t *journal)
* commit block, which happens below in such setting.
*/
err = journal_finish_inode_data_buffers(journal, commit_transaction);
if (err)
jbd2_journal_abort(journal, err);
if (err) {
char b[BDEVNAME_SIZE];

printk(KERN_WARNING
"JBD2: Detected IO errors while flushing file data "
"on %s\n", bdevname(journal->j_fs_dev, b));
err = 0;
}

/* Lo and behold: we have just managed to send a transaction to
the log. Before we can commit it, wait for the IO so far to
Expand Down

0 comments on commit 47f8728

Please sign in to comment.