2.5 [4 of 8] 04-hash_autodetect_fix.diff
PATCH 1/1 2.5 [4 of 8] 04-hash_autodetect_fix.diff
Hello!
Correctly detect and print hash values, when manual hash detection is used.
include/linux/reiserfs_fs.h renamed from include/linux/reiserfs_fs.h.orig +1 -0
@@ -1960,6 +1960,7 @@void check_leaf (struct buffer_head * bh);void check_internal (struct buffer_head * bh);void print_statistics (struct super_block * s); +char *reiserfs_hashname (int code);/* lbalance.c */ int leaf_move_items (int shift_mode,struct tree_balance * tb,int mov_num,int mov_bytes,struct buffer_head * Snew);
fs/reiserfs/super.c renamed from fs/reiserfs/super.c.orig +29 -17
72 lines not on this page · raw message
fs/reiserfs/prints.c renamed from fs/reiserfs/prints.c.orig +12 -2
@@ -477,6 +477,17 @@return 0 ; } +char *reiserfs_hashname (int code) +{ +if ( code ==YURA_HASH ) +return "rupasov" ; +if ( code ==TEA_HASH ) +return "tea" ; +if ( code ==R5_HASH ) +return "r5" ; + +return "unknown" ; +}/* return 1 if this is not super block */ static int print_super_block (struct buffer_head * bh) {
@@ -519,8 +530,7 @@printk ("Journal orig size %d\n" ,sb_jp_journal_size (rs));printk ("FS state %d\n" ,sb_fs_state (rs));printk ("Hash function \"%s\"\n" , -sb_hash_function_code (rs) ==TEA_HASH ?"tea" : - (sb_hash_function_code (rs) ==YURA_HASH ?"rupasov" : (sb_hash_function_code (rs) ==R5_HASH ?"r5" :"unknown" ))); +reiserfs_hashname (sb_hash_function_code (rs)));printk ("Tree height %d\n" ,sb_tree_height (rs));return 0 ;