mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ext3: add an option to control error handling on file data
If the journal doesn't abort when it gets an IO error in file data blocks, the file data corruption will spread silently. Because most of applications and commands do buffered writes without fsync(), they don't notice the IO error. It's scary for mission critical systems. On the other hand, if the journal aborts whenever it gets an IO error in file data blocks, the system will easily become inoperable. So this patch introduces a filesystem option to determine whether it aborts the journal or just call printk() when it gets an IO error in file data. If you mount a ext3 fs with data_err=abort option, it aborts on file data write error. If you mount it with data_err=ignore, it doesn't abort, just call printk(). data_err=ignore is the default. Signed-off-by: Hidehiro Kawai <[email protected]> Cc: Jan Kara <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
46d01a225e
commit
0e4fb5e283
5 changed files with 28 additions and 0 deletions
|
|
@ -482,6 +482,8 @@ void journal_commit_transaction(journal_t *journal)
|
|||
printk(KERN_WARNING
|
||||
"JBD: Detected IO errors while flushing file data "
|
||||
"on %s\n", bdevname(journal->j_fs_dev, b));
|
||||
if (journal->j_flags & JFS_ABORT_ON_SYNCDATA_ERR)
|
||||
journal_abort(journal, err);
|
||||
err = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue