aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.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/inode.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/inode.c')
-rw-r--r--fs/ext4/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 69ea663ef03e..755ba8682233 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -341,6 +341,7 @@ static int __ext4_check_blockref(const char *function, unsigned int line,
341 struct inode *inode, 341 struct inode *inode,
342 __le32 *p, unsigned int max) 342 __le32 *p, unsigned int max)
343{ 343{
344 struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
344 __le32 *bref = p; 345 __le32 *bref = p;
345 unsigned int blk; 346 unsigned int blk;
346 347
@@ -349,6 +350,7 @@ static int __ext4_check_blockref(const char *function, unsigned int line,
349 if (blk && 350 if (blk &&
350 unlikely(!ext4_data_block_valid(EXT4_SB(inode->i_sb), 351 unlikely(!ext4_data_block_valid(EXT4_SB(inode->i_sb),
351 blk, 1))) { 352 blk, 1))) {
353 es->s_last_error_block = cpu_to_le64(blk);
352 ext4_error_inode(inode, function, line, blk, 354 ext4_error_inode(inode, function, line, blk,
353 "invalid block"); 355 "invalid block");
354 return -EIO; 356 return -EIO;