Hi

Ronald Moesbergen wrote:

> Hi,
>
> I'm experiencing some weirdness when checking filesystems.
> When I check my 3.6.25 reiserfs filesystem with reiserfschk3.x.0j, I get no
> errors, but
> when i use reiserfschk3.x.0k-pre9, I get the following:
>

Yes, this is a bug in reiserfsck from 3.x.0k-pre9. The fix is attached.


>
> ...
> bad_leaf: block 8283 has invalid item 2: 3 5131 0x1 DIR (3), len 544,
> location 1496 entry count 14, fsck need 0, format old
> check_semantic_pass: hash mismatch detected (Bj"rk - Cocoon.mp3)
> check_semantic_pass: hash mismatch detected (Bj"rk - Frosti.mp3)
> check_semantic_pass: hash mismatch detected (Bj"rk - Harm of Will.mp3)
> ...
>
> And then is says I need to do a --rebuild-tree to solve this. When I
> rebuild-tree
> with 3.x.0k-pre9, it puts all the 'hash mismatch' files in /lost+found. All
> the files with
> a hash mismatch have a 'weird' character in their filename (like a �) and
> they are
> all placed under /lost+found. When I list a directory containing files with
> �'s, ls
> displays a question mark instead of the �. In other words, I can't place �'s
> in my
> filenames without reiserfschk freaking out. Also, the bad_leaf message keeps
> returning,
> even after I do a --rebuild-tree. What does that message mean anyway? Has it
> got
> anything todo with the �'s?
>
> I've tried this on 2.4.9-plain and 2.4.10-pre9, but both kernel versions
> have this behaviour.
> Should I just use reiserfschk0.xj and wait for the final 'k' release?
>

With the attached fix reiserfsck from k-pre9 has less bugs.

Thanks,
vs

--- hashes.c.old        Mon Sep 17 12:32:53 2001
+++ hashes.c    Mon Sep 17 12:33:29 2001
@@ -51,7 +51,7 @@
        } while(0)
 
 
-u32 keyed_hash(const unsigned char *msg, int len)
+u32 keyed_hash(const char *msg, int len)
 {
        u32 k[] = { 0x9464a485, 0x542e1a94, 0x3e846bff, 0xb75bcfc3}; 
 
@@ -168,7 +168,7 @@
 }
 
 
-u32 yura_hash (const unsigned char *msg, int len)
+u32 yura_hash (const char *msg, int len)
 {
     int j, pow;
     u32 a, c;
@@ -204,7 +204,7 @@
 }
 
 
-u32 r5_hash (const unsigned char *msg, int len)
+u32 r5_hash (const char *msg, int len)
 {
     u32 a=0;
     int i;

Reply via email to