reiserfsck on PPC: checkmem fails
Yesterday, I reported having tried a experimental fix for this problem, that resulted in a spew of error messages. Turns out those were due to a bug in my fix. With that repaired, checkmem error message does indeed disappear.
I've attached a patch showing what I did. With this applied, reiserfsck --check produces the same error messages it did previously, minus the checkmem one. It also produces one new message:
check_and_free_buffer_mem: dirty buffer (3 16) found
I've no idea whether this is due to a problem with my fix, a problem on the disk, or what. The fact that this message wasn't produced before application of my fix doesn't mean much, as in that case reiserfsck was dying in checkmem before getting to the point where this message is produced.
For what it's worth, the _2_ other error messages I'm getting (a) refer to a block used more than once, and (b) say the ondisk bitmap is not correct. Though there's also a message about _3_ corruptions repairable with --fix-fixable. It's quite possible these represent real problems with the filesystem, as the disk has been hit by at least one power failure. Or they could be lingering side effects of the bitmap problem.
At this point, I have no intention of trying to repair the disk without some reassurance that this problem is indeed fixed. My "fix" may be introducing other problems, and there may be other cases of big-endian/little-endian confusion. And I'd rather not spend the time to read all the code to ferret these out. Someone who knows the code can presumably do it much more quickly. :-)
include/io.h +1 -0
@@ -2,6 +2,7 @@* Copyright 1996-2002 Hans Reiser */ +#include "misc.h" struct buffer_head {unsigned long b_blocknr;
include/misc.h +0 -1
@@ -49,7 +49,6 @@int uuid_is_correct (unsigned char * uuid);int set_uuid (const unsigned char * text,unsigned char *UUID ); -#include <asm/bitops.h> #if __BYTE_ORDER == __LITTLE_ENDIANint le_set_bit (int nr,void * addr);int le_clear_bit (int nr,void * addr);
include/swab.h +10 -0
@@ -4,5 +4,15 @@#ifndef _REISERFS_SWAB_H_#define _REISERFS_SWAB_H_ +#include <asm/byteorder.h> +#define __KERNEL__ +#include <asm/bitops.h> +#undef __KERNEL__ +#include <linux/byteorder/swab.h> + +#define swab16 __swab16 +#define swab32 __swab32 +#define swab64 __swab64 +#endif /* _REISERFS_SWAB_H_ */
reiserfscore/bitmap.c +57 -12
125 lines not on this page · raw message
Hi, Patrich!
Sorry for delay, I did not work these few days. Thank you for your patch, I have a look at it, it seems to work right but I would like to rewrite it a bit, to check the whole code for similar problems and to test the result. Could you provide me an access to your computer - I do not have a possiblity to test big endian code locally for now. Do you have a spare partition for experiments there?
Quoted 10 lines · Patrick Smith
Yesterday, I reported having tried a experimental fix for this problem, that resulted in a spew of error messages. Turns out those were due to a bug in my fix. With that repaired, checkmem error message does indeed disappear.
I've attached a patch showing what I did. With this applied, reiserfsck --check produces the same error messages it did previously, minus the checkmem one. It also produces one new message:
check_and_free_buffer_mem: dirty buffer (3 16) found
this is a small inessential bug which I fixed recently - not endian related.
Signature · 2 lines
Thanks, Vitaly Fertman