Messages in this thread Patch in this message | | | Date | Fri, 29 Oct 1999 15:01:35 +0200 | From | Pavel Machek <> | Subject | Re: Still severe corruption under 2.3.24-ikd |
| |
Hi!
> > I'm still experiencing severe data corruption in 2.3.24-ikd. > > > > I see inodes with their block numbers overwritten by -2, I see files > > with mode of -1. Gcc 2.7.2 issue seems to be fixed in 2.3.24... > > > > Data corruption is so bad that I can not (for example) recompile > > kernel on 2.3.24-ikd system. Not by far. > > i have reproduced one fs corrupter and a temporary workaround is in > 2.3.24. I first suspected that the high memory patch did it, but it turned > out that unmap_underlying_metadata() hack either introduced or triggered > data/metadata corruption. (take a look at the buffer.c change) I cannot > reproduce any filesystem corruption with 2.3.24 - could you try it without > ikd?
I found it out:
Memory detection code was not working properly. Therefore system tried to use memory which just was not there (it contained fixed ~0). "Wonderfull" thing was that system went to full multiuser mode, so it could actually trash data on disk very fast. Here's "memory checker" code -- just good enough to catch ROM :). I think performing memcheck at boot might be good idea: this is not my first problem with memory detection...
Pavel
--- clean/init/main.c Sat Oct 23 20:54:57 1999 +++ linux/init/main.c Fri Oct 29 00:29:29 1999 @@ -441,6 +482,46 @@ #endif /* + * Perform simple memory check + */ + +static void **eaten_memory; + +static void eat_memory(void) +{ + int i = 0; + void **c= eaten_memory, *m; + + printk("Eating pages "); + while ((m = get_free_page(GFP_ATOMIC))) { + eaten_memory = m; + if (!(i%5000)) + printk( "." ); + *eaten_memory = c; + c = eaten_memory; + i++; + } + printk("(%dK)\n", i*4); +} + +static void free_memory(void) +{ + int i = 0; + void **c = eaten_memory, *f; + + printk( "Freeing pages " ); + while (c) { + if (!(i%5000)) + printk( "." ); + f = *c; + c = *c; + if (f) { free_page( f ); i++; } + } + printk( "(%dK)\n", i*4 ); + eaten_memory = NULL; +} + +/* * Activate the first processor. */ @@ -494,12 +575,15 @@ } #endif mem_init(); kmem_cache_sizes_init(); #ifdef CONFIG_PROC_FS proc_root_init(); #endif mempages = num_physpages; + eat_memory(); /* Before mounting root so that we don't damage it */ + free_memory(); + fork_init(mempages); filescache_init(); dcache_init(); -- I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel. Pavel Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |