xfs: print name of verifier if it fails
PATCH 1/1 xfs: print name of verifier if it fails
This adds a name to each buf_ops structure, so that if a verifier fails we can print the type of verifier that failed it. Should be a slight debugging aid, I hope.
---
fs/xfs/libxfs/xfs_alloc.c +2 -0
@@ -535,6 +535,7 @@ xfs_agfl_write_verify( }const struct xfs_buf_ops xfs_agfl_buf_ops = { + .name ="xfs_agfl" , .verify_read = xfs_agfl_read_verify, .verify_write = xfs_agfl_write_verify, };
@@ -2339,6 +2340,7 @@ xfs_agf_write_verify( }const struct xfs_buf_ops xfs_agf_buf_ops = { + .name ="xfs_agf" , .verify_read = xfs_agf_read_verify, .verify_write = xfs_agf_write_verify, };
fs/xfs/libxfs/xfs_alloc_btree.c +1 -0
@@ -379,6 +379,7 @@ xfs_allocbt_write_verify( }const struct xfs_buf_ops xfs_allocbt_buf_ops = { + .name ="xfs_allocbt" , .verify_read = xfs_allocbt_read_verify, .verify_write = xfs_allocbt_write_verify, };
fs/xfs/libxfs/xfs_attr_leaf.c +1 -0
@@ -328,6 +328,7 @@ xfs_attr3_leaf_read_verify( }const struct xfs_buf_ops xfs_attr3_leaf_buf_ops = { + .name ="xfs_attr3_leaf" , .verify_read = xfs_attr3_leaf_read_verify, .verify_write = xfs_attr3_leaf_write_verify, };
fs/xfs/libxfs/xfs_attr_remote.c +1 -0
@@ -201,6 +201,7 @@ xfs_attr3_rmt_write_verify( }const struct xfs_buf_ops xfs_attr3_rmt_buf_ops = { + .name ="xfs_attr3_rmt" , .verify_read = xfs_attr3_rmt_read_verify, .verify_write = xfs_attr3_rmt_write_verify, };
fs/xfs/libxfs/xfs_bmap_btree.c +1 -0
@@ -720,6 +720,7 @@ xfs_bmbt_write_verify( }const struct xfs_buf_ops xfs_bmbt_buf_ops = { + .name ="xfs_bmbt" , .verify_read = xfs_bmbt_read_verify, .verify_write = xfs_bmbt_write_verify, };
fs/xfs/libxfs/xfs_da_btree.c +1 -0
@@ -245,6 +245,7 @@ xfs_da3_node_read_verify( }const struct xfs_buf_ops xfs_da3_node_buf_ops = { + .name ="xfs_da3_node" , .verify_read = xfs_da3_node_read_verify, .verify_write = xfs_da3_node_write_verify, };
fs/xfs/libxfs/xfs_dir2_block.c +1 -0
@@ -123,6 +123,7 @@ xfs_dir3_block_write_verify( }const struct xfs_buf_ops xfs_dir3_block_buf_ops = { + .name ="xfs_dir3_block" , .verify_read = xfs_dir3_block_read_verify, .verify_write = xfs_dir3_block_write_verify, };
fs/xfs/libxfs/xfs_dir2_data.c +2 -0
@@ -305,11 +305,13 @@ xfs_dir3_data_write_verify( }const struct xfs_buf_ops xfs_dir3_data_buf_ops = { + .name ="xfs_dir3_data" , .verify_read = xfs_dir3_data_read_verify, .verify_write = xfs_dir3_data_write_verify, };static const struct xfs_buf_ops xfs_dir3_data_reada_buf_ops = { + .name ="xfs_dir3_data_reada" , .verify_read = xfs_dir3_data_reada_verify, .verify_write = xfs_dir3_data_write_verify, };
fs/xfs/libxfs/xfs_dir2_leaf.c +2 -0
@@ -245,11 +245,13 @@ xfs_dir3_leafn_write_verify( }const struct xfs_buf_ops xfs_dir3_leaf1_buf_ops = { + .name ="xfs_dir3_leaf1" , .verify_read = xfs_dir3_leaf1_read_verify, .verify_write = xfs_dir3_leaf1_write_verify, };const struct xfs_buf_ops xfs_dir3_leafn_buf_ops = { + .name ="xfs_dir3_leafn" , .verify_read = xfs_dir3_leafn_read_verify, .verify_write = xfs_dir3_leafn_write_verify, };
fs/xfs/libxfs/xfs_dir2_node.c +1 -0
@@ -150,6 +150,7 @@ xfs_dir3_free_write_verify( }const struct xfs_buf_ops xfs_dir3_free_buf_ops = { + .name ="xfs_dir3_free" , .verify_read = xfs_dir3_free_read_verify, .verify_write = xfs_dir3_free_write_verify, };
fs/xfs/libxfs/xfs_dquot_buf.c +1 -0
@@ -282,6 +282,7 @@ xfs_dquot_buf_write_verify( }const struct xfs_buf_ops xfs_dquot_buf_ops = { + .name ="xfs_dquot" , .verify_read = xfs_dquot_buf_read_verify, .verify_write = xfs_dquot_buf_write_verify, };
fs/xfs/libxfs/xfs_ialloc.c +1 -0
@@ -2572,6 +2572,7 @@ xfs_agi_write_verify( }const struct xfs_buf_ops xfs_agi_buf_ops = { + .name ="xfs_agi" , .verify_read = xfs_agi_read_verify, .verify_write = xfs_agi_write_verify, };
fs/xfs/libxfs/xfs_ialloc_btree.c +1 -0
@@ -304,6 +304,7 @@ xfs_inobt_write_verify( }const struct xfs_buf_ops xfs_inobt_buf_ops = { + .name ="xfs_inobt" , .verify_read = xfs_inobt_read_verify, .verify_write = xfs_inobt_write_verify, };
fs/xfs/libxfs/xfs_inode_buf.c +2 -0
@@ -132,11 +132,13 @@ xfs_inode_buf_write_verify( }const struct xfs_buf_ops xfs_inode_buf_ops = { + .name ="xfs_inode" , .verify_read = xfs_inode_buf_read_verify, .verify_write = xfs_inode_buf_write_verify, };const struct xfs_buf_ops xfs_inode_buf_ra_ops = { + .name ="xxfs_inode_ra" , .verify_read = xfs_inode_buf_readahead_verify, .verify_write = xfs_inode_buf_write_verify, };
fs/xfs/libxfs/xfs_sb.c +2 -0
@@ -679,11 +679,13 @@ xfs_sb_write_verify( }const struct xfs_buf_ops xfs_sb_buf_ops = { + .name ="xfs_sb" , .verify_read = xfs_sb_read_verify, .verify_write = xfs_sb_write_verify, };const struct xfs_buf_ops xfs_sb_quiet_buf_ops = { + .name ="xfs_sb_quiet" , .verify_read = xfs_sb_quiet_read_verify, .verify_write = xfs_sb_write_verify, };
fs/xfs/libxfs/xfs_symlink_remote.c +1 -0
@@ -168,6 +168,7 @@ xfs_symlink_write_verify( }const struct xfs_buf_ops xfs_symlink_buf_ops = { + .name ="xfs_symlink" , .verify_read = xfs_symlink_read_verify, .verify_write = xfs_symlink_write_verify, };
fs/xfs/xfs_buf.h +1 -0
@@ -132,6 +132,7 @@ struct xfs_buf_map {struct xfs_buf_map (map) = { .bm_bn = (blkno), .bm_len = (numblk) };struct xfs_buf_ops { +char *name;void (*verify_read)(struct xfs_buf *);void (*verify_write)(struct xfs_buf *); };
fs/xfs/xfs_error.c +2 -2
@@ -164,9 +164,9 @@ xfs_verifier_error( {struct xfs_mount *mp = bp->b_target->bt_mount; -xfs_alert (mp,"Metadata %s detected at %pF, block 0x%llx" , +xfs_alert (mp,"Metadata %s detected at %pF, %s block 0x%llx" , bp->b_error == -EFSBADCRC ?"CRC error" :"corruption" , - __return_address, bp->b_bn); + __return_address, bp->b_ops->name, bp->b_bn);xfs_alert (mp,"Unmount and run xfs_repair" );
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 6 lines · Eric Sandeen
This adds a name to each
buf_opsstructure, so that if a verifier fails we can print the type of verifier that failed it. Should be a slight debugging aid, I hope.Signed-off-by Eric Sandeen <[email protected]>---
Seems harmless, but is this really necessary when we dump a stack trace? I suppose that only happens if the error level is set appropriately. Another option might be to use _RET_IP_. It might not be as pretty, but we already use it all over the place for tracepoints and such.
Brian
Quoted 254 lines
fs/xfs/libxfs/xfs_alloc.c +2
-0@@ -535,6 +535,7 @@ xfs_agfl_write_verify( }const struct xfs_buf_ops xfs_agfl_buf_ops = { + .name ="xfs_agfl" , .verify_read = xfs_agfl_read_verify, .verify_write = xfs_agfl_write_verify, };@@ -2339,6 +2340,7 @@ xfs_agf_write_verify( }const struct xfs_buf_ops xfs_agf_buf_ops = { + .name ="xfs_agf" , .verify_read = xfs_agf_read_verify, .verify_write = xfs_agf_write_verify, };fs/xfs/libxfs/xfs_alloc_btree.c +1
-0@@ -379,6 +379,7 @@ xfs_allocbt_write_verify( }const struct xfs_buf_ops xfs_allocbt_buf_ops = { + .name ="xfs_allocbt" , .verify_read = xfs_allocbt_read_verify, .verify_write = xfs_allocbt_write_verify, };fs/xfs/libxfs/xfs_attr_leaf.c +1
-0@@ -328,6 +328,7 @@ xfs_attr3_leaf_read_verify( }const struct xfs_buf_ops xfs_attr3_leaf_buf_ops = { + .name ="xfs_attr3_leaf" , .verify_read = xfs_attr3_leaf_read_verify, .verify_write = xfs_attr3_leaf_write_verify, };fs/xfs/libxfs/xfs_attr_remote.c +1
-0@@ -201,6 +201,7 @@ xfs_attr3_rmt_write_verify( }const struct xfs_buf_ops xfs_attr3_rmt_buf_ops = { + .name ="xfs_attr3_rmt" , .verify_read = xfs_attr3_rmt_read_verify, .verify_write = xfs_attr3_rmt_write_verify, };fs/xfs/libxfs/xfs_bmap_btree.c +1
-0@@ -720,6 +720,7 @@ xfs_bmbt_write_verify( }const struct xfs_buf_ops xfs_bmbt_buf_ops = { + .name ="xfs_bmbt" , .verify_read = xfs_bmbt_read_verify, .verify_write = xfs_bmbt_write_verify, };fs/xfs/libxfs/xfs_da_btree.c +1
-0@@ -245,6 +245,7 @@ xfs_da3_node_read_verify( }const struct xfs_buf_ops xfs_da3_node_buf_ops = { + .name ="xfs_da3_node" , .verify_read = xfs_da3_node_read_verify, .verify_write = xfs_da3_node_write_verify, };fs/xfs/libxfs/xfs_dir2_block.c +1
-0@@ -123,6 +123,7 @@ xfs_dir3_block_write_verify( }const struct xfs_buf_ops xfs_dir3_block_buf_ops = { + .name ="xfs_dir3_block" , .verify_read = xfs_dir3_block_read_verify, .verify_write = xfs_dir3_block_write_verify, };fs/xfs/libxfs/xfs_dir2_data.c +2
-0@@ -305,11 +305,13 @@ xfs_dir3_data_write_verify( }const struct xfs_buf_ops xfs_dir3_data_buf_ops = { + .name ="xfs_dir3_data" , .verify_read = xfs_dir3_data_read_verify, .verify_write = xfs_dir3_data_write_verify, };static const struct xfs_buf_ops xfs_dir3_data_reada_buf_ops = { + .name ="xfs_dir3_data_reada" , .verify_read = xfs_dir3_data_reada_verify, .verify_write = xfs_dir3_data_write_verify, };fs/xfs/libxfs/xfs_dir2_leaf.c +2
-0@@ -245,11 +245,13 @@ xfs_dir3_leafn_write_verify( }const struct xfs_buf_ops xfs_dir3_leaf1_buf_ops = { + .name ="xfs_dir3_leaf1" , .verify_read = xfs_dir3_leaf1_read_verify, .verify_write = xfs_dir3_leaf1_write_verify, };const struct xfs_buf_ops xfs_dir3_leafn_buf_ops = { + .name ="xfs_dir3_leafn" , .verify_read = xfs_dir3_leafn_read_verify, .verify_write = xfs_dir3_leafn_write_verify, };fs/xfs/libxfs/xfs_dir2_node.c +1
-0@@ -150,6 +150,7 @@ xfs_dir3_free_write_verify( }const struct xfs_buf_ops xfs_dir3_free_buf_ops = { + .name ="xfs_dir3_free" , .verify_read = xfs_dir3_free_read_verify, .verify_write = xfs_dir3_free_write_verify, };fs/xfs/libxfs/xfs_dquot_buf.c +1
-0@@ -282,6 +282,7 @@ xfs_dquot_buf_write_verify( }const struct xfs_buf_ops xfs_dquot_buf_ops = { + .name ="xfs_dquot" , .verify_read = xfs_dquot_buf_read_verify, .verify_write = xfs_dquot_buf_write_verify, };fs/xfs/libxfs/xfs_ialloc.c +1
-0@@ -2572,6 +2572,7 @@ xfs_agi_write_verify( }const struct xfs_buf_ops xfs_agi_buf_ops = { + .name ="xfs_agi" , .verify_read = xfs_agi_read_verify, .verify_write = xfs_agi_write_verify, };fs/xfs/libxfs/xfs_ialloc_btree.c +1
-0@@ -304,6 +304,7 @@ xfs_inobt_write_verify( }const struct xfs_buf_ops xfs_inobt_buf_ops = { + .name ="xfs_inobt" , .verify_read = xfs_inobt_read_verify, .verify_write = xfs_inobt_write_verify, };fs/xfs/libxfs/xfs_inode_buf.c +2
-0@@ -132,11 +132,13 @@ xfs_inode_buf_write_verify( }const struct xfs_buf_ops xfs_inode_buf_ops = { + .name ="xfs_inode" , .verify_read = xfs_inode_buf_read_verify, .verify_write = xfs_inode_buf_write_verify, };const struct xfs_buf_ops xfs_inode_buf_ra_ops = { + .name ="xxfs_inode_ra" , .verify_read = xfs_inode_buf_readahead_verify, .verify_write = xfs_inode_buf_write_verify, };fs/xfs/libxfs/xfs_sb.c +2
-0@@ -679,11 +679,13 @@ xfs_sb_write_verify( }const struct xfs_buf_ops xfs_sb_buf_ops = { + .name ="xfs_sb" , .verify_read = xfs_sb_read_verify, .verify_write = xfs_sb_write_verify, };const struct xfs_buf_ops xfs_sb_quiet_buf_ops = { + .name ="xfs_sb_quiet" , .verify_read = xfs_sb_quiet_read_verify, .verify_write = xfs_sb_write_verify, };fs/xfs/libxfs/xfs_symlink_remote.c +1
-0@@ -168,6 +168,7 @@ xfs_symlink_write_verify( }const struct xfs_buf_ops xfs_symlink_buf_ops = { + .name ="xfs_symlink" , .verify_read = xfs_symlink_read_verify, .verify_write = xfs_symlink_write_verify, };fs/xfs/xfs_buf.h +1
-0@@ -132,6 +132,7 @@ struct xfs_buf_map {struct xfs_buf_map (map) = { .bm_bn = (blkno), .bm_len = (numblk) };struct xfs_buf_ops { +char *name;void (*verify_read)(struct xfs_buf *);void (*verify_write)(struct xfs_buf *); };fs/xfs/xfs_error.c +2
-2@@ -164,9 +164,9 @@ xfs_verifier_error( {struct xfs_mount *mp = bp->b_target->bt_mount; -xfs_alert (mp,"Metadata %s detected at %pF, block 0x%llx" , +xfs_alert (mp,"Metadata %s detected at %pF, %s block 0x%llx" , bp->b_error == -EFSBADCRC ?"CRC error" :"corruption" , - __return_address, bp->b_bn); + __return_address, bp->b_ops->name, bp->b_bn);xfs_alert (mp,"Unmount and run xfs_repair" );
Quoted 4 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 5 lines · Brian Foster
Quoted 4 lines · Eric Sandeen
This adds a name to each
buf_opsstructure, so that if a verifier fails we can print the type of verifier that failed it. Should be a slight debugging aid, I hope.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Eric Sandeen <[email protected]>---
Seems harmless, but is this really necessary when we dump a stack trace? I suppose that only happens if the error level is set appropriately. Another option might be to use _RET_IP_. It might not be as pretty, but we already use it all over the place for tracepoints and such.
The main motivator for the patch is userspace, where we have no dump_stack, error level, etc. This patch is just to keep things in sync in libxfs.
Thanks,
-Eric
Quoted 256 lines
Brian
Quoted 254 lines
fs/xfs/libxfs/xfs_alloc.c +2
-0@@ -535,6 +535,7 @@ xfs_agfl_write_verify( }const struct xfs_buf_ops xfs_agfl_buf_ops = { + .name ="xfs_agfl" , .verify_read = xfs_agfl_read_verify, .verify_write = xfs_agfl_write_verify, };@@ -2339,6 +2340,7 @@ xfs_agf_write_verify( }const struct xfs_buf_ops xfs_agf_buf_ops = { + .name ="xfs_agf" , .verify_read = xfs_agf_read_verify, .verify_write = xfs_agf_write_verify, };fs/xfs/libxfs/xfs_alloc_btree.c +1
-0@@ -379,6 +379,7 @@ xfs_allocbt_write_verify( }const struct xfs_buf_ops xfs_allocbt_buf_ops = { + .name ="xfs_allocbt" , .verify_read = xfs_allocbt_read_verify, .verify_write = xfs_allocbt_write_verify, };fs/xfs/libxfs/xfs_attr_leaf.c +1
-0@@ -328,6 +328,7 @@ xfs_attr3_leaf_read_verify( }const struct xfs_buf_ops xfs_attr3_leaf_buf_ops = { + .name ="xfs_attr3_leaf" , .verify_read = xfs_attr3_leaf_read_verify, .verify_write = xfs_attr3_leaf_write_verify, };fs/xfs/libxfs/xfs_attr_remote.c +1
-0@@ -201,6 +201,7 @@ xfs_attr3_rmt_write_verify( }const struct xfs_buf_ops xfs_attr3_rmt_buf_ops = { + .name ="xfs_attr3_rmt" , .verify_read = xfs_attr3_rmt_read_verify, .verify_write = xfs_attr3_rmt_write_verify, };fs/xfs/libxfs/xfs_bmap_btree.c +1
-0@@ -720,6 +720,7 @@ xfs_bmbt_write_verify( }const struct xfs_buf_ops xfs_bmbt_buf_ops = { + .name ="xfs_bmbt" , .verify_read = xfs_bmbt_read_verify, .verify_write = xfs_bmbt_write_verify, };fs/xfs/libxfs/xfs_da_btree.c +1
-0@@ -245,6 +245,7 @@ xfs_da3_node_read_verify( }const struct xfs_buf_ops xfs_da3_node_buf_ops = { + .name ="xfs_da3_node" , .verify_read = xfs_da3_node_read_verify, .verify_write = xfs_da3_node_write_verify, };fs/xfs/libxfs/xfs_dir2_block.c +1
-0@@ -123,6 +123,7 @@ xfs_dir3_block_write_verify( }const struct xfs_buf_ops xfs_dir3_block_buf_ops = { + .name ="xfs_dir3_block" , .verify_read = xfs_dir3_block_read_verify, .verify_write = xfs_dir3_block_write_verify, };fs/xfs/libxfs/xfs_dir2_data.c +2
-0@@ -305,11 +305,13 @@ xfs_dir3_data_write_verify( }const struct xfs_buf_ops xfs_dir3_data_buf_ops = { + .name ="xfs_dir3_data" , .verify_read = xfs_dir3_data_read_verify, .verify_write = xfs_dir3_data_write_verify, };static const struct xfs_buf_ops xfs_dir3_data_reada_buf_ops = { + .name ="xfs_dir3_data_reada" , .verify_read = xfs_dir3_data_reada_verify, .verify_write = xfs_dir3_data_write_verify, };fs/xfs/libxfs/xfs_dir2_leaf.c +2
-0@@ -245,11 +245,13 @@ xfs_dir3_leafn_write_verify( }const struct xfs_buf_ops xfs_dir3_leaf1_buf_ops = { + .name ="xfs_dir3_leaf1" , .verify_read = xfs_dir3_leaf1_read_verify, .verify_write = xfs_dir3_leaf1_write_verify, };const struct xfs_buf_ops xfs_dir3_leafn_buf_ops = { + .name ="xfs_dir3_leafn" , .verify_read = xfs_dir3_leafn_read_verify, .verify_write = xfs_dir3_leafn_write_verify, };fs/xfs/libxfs/xfs_dir2_node.c +1
-0@@ -150,6 +150,7 @@ xfs_dir3_free_write_verify( }const struct xfs_buf_ops xfs_dir3_free_buf_ops = { + .name ="xfs_dir3_free" , .verify_read = xfs_dir3_free_read_verify, .verify_write = xfs_dir3_free_write_verify, };fs/xfs/libxfs/xfs_dquot_buf.c +1
-0@@ -282,6 +282,7 @@ xfs_dquot_buf_write_verify( }const struct xfs_buf_ops xfs_dquot_buf_ops = { + .name ="xfs_dquot" , .verify_read = xfs_dquot_buf_read_verify, .verify_write = xfs_dquot_buf_write_verify, };fs/xfs/libxfs/xfs_ialloc.c +1
-0@@ -2572,6 +2572,7 @@ xfs_agi_write_verify( }const struct xfs_buf_ops xfs_agi_buf_ops = { + .name ="xfs_agi" , .verify_read = xfs_agi_read_verify, .verify_write = xfs_agi_write_verify, };fs/xfs/libxfs/xfs_ialloc_btree.c +1
-0@@ -304,6 +304,7 @@ xfs_inobt_write_verify( }const struct xfs_buf_ops xfs_inobt_buf_ops = { + .name ="xfs_inobt" , .verify_read = xfs_inobt_read_verify, .verify_write = xfs_inobt_write_verify, };fs/xfs/libxfs/xfs_inode_buf.c +2
-0@@ -132,11 +132,13 @@ xfs_inode_buf_write_verify( }const struct xfs_buf_ops xfs_inode_buf_ops = { + .name ="xfs_inode" , .verify_read = xfs_inode_buf_read_verify, .verify_write = xfs_inode_buf_write_verify, };const struct xfs_buf_ops xfs_inode_buf_ra_ops = { + .name ="xxfs_inode_ra" , .verify_read = xfs_inode_buf_readahead_verify, .verify_write = xfs_inode_buf_write_verify, };fs/xfs/libxfs/xfs_sb.c +2
-0@@ -679,11 +679,13 @@ xfs_sb_write_verify( }const struct xfs_buf_ops xfs_sb_buf_ops = { + .name ="xfs_sb" , .verify_read = xfs_sb_read_verify, .verify_write = xfs_sb_write_verify, };const struct xfs_buf_ops xfs_sb_quiet_buf_ops = { + .name ="xfs_sb_quiet" , .verify_read = xfs_sb_quiet_read_verify, .verify_write = xfs_sb_write_verify, };fs/xfs/libxfs/xfs_symlink_remote.c +1
-0@@ -168,6 +168,7 @@ xfs_symlink_write_verify( }const struct xfs_buf_ops xfs_symlink_buf_ops = { + .name ="xfs_symlink" , .verify_read = xfs_symlink_read_verify, .verify_write = xfs_symlink_write_verify, };fs/xfs/xfs_buf.h +1
-0@@ -132,6 +132,7 @@ struct xfs_buf_map {struct xfs_buf_map (map) = { .bm_bn = (blkno), .bm_len = (numblk) };struct xfs_buf_ops { +char *name;void (*verify_read)(struct xfs_buf *);void (*verify_write)(struct xfs_buf *); };fs/xfs/xfs_error.c +2
-2@@ -164,9 +164,9 @@ xfs_verifier_error( {struct xfs_mount *mp = bp->b_target->bt_mount; -xfs_alert (mp,"Metadata %s detected at %pF, block 0x%llx" , +xfs_alert (mp,"Metadata %s detected at %pF, %s block 0x%llx" , bp->b_error == -EFSBADCRC ?"CRC error" :"corruption" , - __return_address, bp->b_bn); + __return_address, bp->b_ops->name, bp->b_bn);xfs_alert (mp,"Unmount and run xfs_repair" );
Quoted 10 lines
Quoted 4 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Brian Foster
Reviewed-byQuoted 11 lines · Eric Sandeen
Quoted 8 lines · Brian Foster
Quoted 6 lines · Eric Sandeen
This adds a name to each
buf_opsstructure, so that if a verifier fails we can print the type of verifier that failed it. Should be a slight debugging aid, I hope.Signed-off-by Eric Sandeen <[email protected]>---
Quoted 8 lines
Quoted 4 lines
Seems harmless, but is this really necessary when we dump a stack trace? I suppose that only happens if the error level is set appropriately. Another option might be to use _RET_IP_. It might not be as pretty, but we already use it all over the place for tracepoints and such.
The main motivator for the patch is userspace, where we have no
dump_stack, error level, etc. This patch is just to keep things in sync in libxfs.
Ah, sounds good to me:
Quoted 270 lines
Thanks,
-EricQuoted 256 lines
Brian
Quoted 254 lines
fs/xfs/libxfs/xfs_alloc.c +2
-0@@ -535,6 +535,7 @@ xfs_agfl_write_verify( }const struct xfs_buf_ops xfs_agfl_buf_ops = { + .name ="xfs_agfl" , .verify_read = xfs_agfl_read_verify, .verify_write = xfs_agfl_write_verify, };@@ -2339,6 +2340,7 @@ xfs_agf_write_verify( }const struct xfs_buf_ops xfs_agf_buf_ops = { + .name ="xfs_agf" , .verify_read = xfs_agf_read_verify, .verify_write = xfs_agf_write_verify, };fs/xfs/libxfs/xfs_alloc_btree.c +1
-0@@ -379,6 +379,7 @@ xfs_allocbt_write_verify( }const struct xfs_buf_ops xfs_allocbt_buf_ops = { + .name ="xfs_allocbt" , .verify_read = xfs_allocbt_read_verify, .verify_write = xfs_allocbt_write_verify, };fs/xfs/libxfs/xfs_attr_leaf.c +1
-0@@ -328,6 +328,7 @@ xfs_attr3_leaf_read_verify( }const struct xfs_buf_ops xfs_attr3_leaf_buf_ops = { + .name ="xfs_attr3_leaf" , .verify_read = xfs_attr3_leaf_read_verify, .verify_write = xfs_attr3_leaf_write_verify, };fs/xfs/libxfs/xfs_attr_remote.c +1
-0@@ -201,6 +201,7 @@ xfs_attr3_rmt_write_verify( }const struct xfs_buf_ops xfs_attr3_rmt_buf_ops = { + .name ="xfs_attr3_rmt" , .verify_read = xfs_attr3_rmt_read_verify, .verify_write = xfs_attr3_rmt_write_verify, };fs/xfs/libxfs/xfs_bmap_btree.c +1
-0@@ -720,6 +720,7 @@ xfs_bmbt_write_verify( }const struct xfs_buf_ops xfs_bmbt_buf_ops = { + .name ="xfs_bmbt" , .verify_read = xfs_bmbt_read_verify, .verify_write = xfs_bmbt_write_verify, };fs/xfs/libxfs/xfs_da_btree.c +1
-0@@ -245,6 +245,7 @@ xfs_da3_node_read_verify( }const struct xfs_buf_ops xfs_da3_node_buf_ops = { + .name ="xfs_da3_node" , .verify_read = xfs_da3_node_read_verify, .verify_write = xfs_da3_node_write_verify, };fs/xfs/libxfs/xfs_dir2_block.c +1
-0@@ -123,6 +123,7 @@ xfs_dir3_block_write_verify( }const struct xfs_buf_ops xfs_dir3_block_buf_ops = { + .name ="xfs_dir3_block" , .verify_read = xfs_dir3_block_read_verify, .verify_write = xfs_dir3_block_write_verify, };fs/xfs/libxfs/xfs_dir2_data.c +2
-0@@ -305,11 +305,13 @@ xfs_dir3_data_write_verify( }const struct xfs_buf_ops xfs_dir3_data_buf_ops = { + .name ="xfs_dir3_data" , .verify_read = xfs_dir3_data_read_verify, .verify_write = xfs_dir3_data_write_verify, };static const struct xfs_buf_ops xfs_dir3_data_reada_buf_ops = { + .name ="xfs_dir3_data_reada" , .verify_read = xfs_dir3_data_reada_verify, .verify_write = xfs_dir3_data_write_verify, };fs/xfs/libxfs/xfs_dir2_leaf.c +2
-0@@ -245,11 +245,13 @@ xfs_dir3_leafn_write_verify( }const struct xfs_buf_ops xfs_dir3_leaf1_buf_ops = { + .name ="xfs_dir3_leaf1" , .verify_read = xfs_dir3_leaf1_read_verify, .verify_write = xfs_dir3_leaf1_write_verify, };const struct xfs_buf_ops xfs_dir3_leafn_buf_ops = { + .name ="xfs_dir3_leafn" , .verify_read = xfs_dir3_leafn_read_verify, .verify_write = xfs_dir3_leafn_write_verify, };fs/xfs/libxfs/xfs_dir2_node.c +1
-0@@ -150,6 +150,7 @@ xfs_dir3_free_write_verify( }const struct xfs_buf_ops xfs_dir3_free_buf_ops = { + .name ="xfs_dir3_free" , .verify_read = xfs_dir3_free_read_verify, .verify_write = xfs_dir3_free_write_verify, };fs/xfs/libxfs/xfs_dquot_buf.c +1
-0@@ -282,6 +282,7 @@ xfs_dquot_buf_write_verify( }const struct xfs_buf_ops xfs_dquot_buf_ops = { + .name ="xfs_dquot" , .verify_read = xfs_dquot_buf_read_verify, .verify_write = xfs_dquot_buf_write_verify, };fs/xfs/libxfs/xfs_ialloc.c +1
-0@@ -2572,6 +2572,7 @@ xfs_agi_write_verify( }const struct xfs_buf_ops xfs_agi_buf_ops = { + .name ="xfs_agi" , .verify_read = xfs_agi_read_verify, .verify_write = xfs_agi_write_verify, };fs/xfs/libxfs/xfs_ialloc_btree.c +1
-0@@ -304,6 +304,7 @@ xfs_inobt_write_verify( }const struct xfs_buf_ops xfs_inobt_buf_ops = { + .name ="xfs_inobt" , .verify_read = xfs_inobt_read_verify, .verify_write = xfs_inobt_write_verify, };fs/xfs/libxfs/xfs_inode_buf.c +2
-0@@ -132,11 +132,13 @@ xfs_inode_buf_write_verify( }const struct xfs_buf_ops xfs_inode_buf_ops = { + .name ="xfs_inode" , .verify_read = xfs_inode_buf_read_verify, .verify_write = xfs_inode_buf_write_verify, };const struct xfs_buf_ops xfs_inode_buf_ra_ops = { + .name ="xxfs_inode_ra" , .verify_read = xfs_inode_buf_readahead_verify, .verify_write = xfs_inode_buf_write_verify, };fs/xfs/libxfs/xfs_sb.c +2
-0@@ -679,11 +679,13 @@ xfs_sb_write_verify( }const struct xfs_buf_ops xfs_sb_buf_ops = { + .name ="xfs_sb" , .verify_read = xfs_sb_read_verify, .verify_write = xfs_sb_write_verify, };const struct xfs_buf_ops xfs_sb_quiet_buf_ops = { + .name ="xfs_sb_quiet" , .verify_read = xfs_sb_quiet_read_verify, .verify_write = xfs_sb_write_verify, };fs/xfs/libxfs/xfs_symlink_remote.c +1
-0@@ -168,6 +168,7 @@ xfs_symlink_write_verify( }const struct xfs_buf_ops xfs_symlink_buf_ops = { + .name ="xfs_symlink" , .verify_read = xfs_symlink_read_verify, .verify_write = xfs_symlink_write_verify, };fs/xfs/xfs_buf.h +1
-0@@ -132,6 +132,7 @@ struct xfs_buf_map {struct xfs_buf_map (map) = { .bm_bn = (blkno), .bm_len = (numblk) };struct xfs_buf_ops { +char *name;void (*verify_read)(struct xfs_buf *);void (*verify_write)(struct xfs_buf *); };fs/xfs/xfs_error.c +2
-2@@ -164,9 +164,9 @@ xfs_verifier_error( {struct xfs_mount *mp = bp->b_target->bt_mount; -xfs_alert (mp,"Metadata %s detected at %pF, block 0x%llx" , +xfs_alert (mp,"Metadata %s detected at %pF, %s block 0x%llx" , bp->b_error == -EFSBADCRC ?"CRC error" :"corruption" , - __return_address, bp->b_bn); + __return_address, bp->b_ops->name, bp->b_bn);xfs_alert (mp,"Unmount and run xfs_repair" );Quoted 10 lines
Quoted 4 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs