aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4_jbd2.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-07-27 11:56:03 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-07-27 11:56:03 -0400
commit1c13d5c0872870cca3e612aa045d492ead9ab004 (patch)
tree6e3dd0d3f49ff56dda9fc6cd72c233759bc24e09 /fs/ext4/ext4_jbd2.c
parentc398eda0e43a791be0fca6f197a1e2bbb9f16070 (diff)
ext4: Save error information to the superblock for analysis
Save number of file system errors, and the time function name, line number, block number, and inode number of the first and most recent errors reported on the file system in the superblock. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4_jbd2.c')
-rw-r--r--fs/ext4/ext4_jbd2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
index 23425cd68daa..6e272ef6ba96 100644
--- a/fs/ext4/ext4_jbd2.c
+++ b/fs/ext4/ext4_jbd2.c
@@ -134,6 +134,11 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line,
134 if (inode && inode_needs_sync(inode)) { 134 if (inode && inode_needs_sync(inode)) {
135 sync_dirty_buffer(bh); 135 sync_dirty_buffer(bh);
136 if (buffer_req(bh) && !buffer_uptodate(bh)) { 136 if (buffer_req(bh) && !buffer_uptodate(bh)) {
137 struct ext4_super_block *es;
138
139 es = EXT4_SB(inode->i_sb)->s_es;
140 es->s_last_error_block =
141 cpu_to_le64(bh->b_blocknr);
137 ext4_error_inode(inode, where, line, 142 ext4_error_inode(inode, where, line,
138 bh->b_blocknr, 143 bh->b_blocknr,
139 "IO error syncing itable block"); 144 "IO error syncing itable block");