aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
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.h
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.h')
-rw-r--r--fs/ext4/ext4.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 088938148f5c..6b96125e7255 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1011,9 +1011,24 @@ struct ext4_super_block {
1011 snapshot's future use */ 1011 snapshot's future use */
1012 __le32 s_snapshot_list; /* inode number of the head of the 1012 __le32 s_snapshot_list; /* inode number of the head of the
1013 on-disk snapshot list */ 1013 on-disk snapshot list */
1014 __u32 s_reserved[155]; /* Padding to the end of the block */ 1014#define EXT4_S_ERR_START offsetof(struct ext4_super_block, s_error_count)
1015 __le32 s_error_count; /* number of fs errors */
1016 __le32 s_first_error_time; /* first time an error happened */
1017 __le32 s_first_error_ino; /* inode involved in first error */
1018 __le64 s_first_error_block; /* block involved of first error */
1019 __u8 s_first_error_func[32]; /* function where the error happened */
1020 __le32 s_first_error_line; /* line number where error happened */
1021 __le32 s_last_error_time; /* most recent time of an error */
1022 __le32 s_last_error_ino; /* inode involved in last error */
1023 __le32 s_last_error_line; /* line number where error happened */
1024 __le64 s_last_error_block; /* block involved of last error */
1025 __u8 s_last_error_func[32]; /* function where the error happened */
1026#define EXT4_S_ERR_END offsetof(struct ext4_super_block, s_reserved)
1027 __le32 s_reserved[128]; /* Padding to the end of the block */
1015}; 1028};
1016 1029
1030#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START)
1031
1017#ifdef __KERNEL__ 1032#ifdef __KERNEL__
1018 1033
1019/* 1034/*