public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] raid5 fix after xor.c cleanup
@ 2000-11-17 22:41 Jasper Spaans
  2000-11-18 11:35 ` Jasper Spaans
  0 siblings, 1 reply; 8+ messages in thread
From: Jasper Spaans @ 2000-11-17 22:41 UTC (permalink / raw)
  To: mingo; +Cc: linux-raid, linux-kernel

Hi Ingo & lists,

due to the xor.c cleanup in 2.4.0-test11-pre5+, raid5 compiled into the
kernel fails when booting, because the calibrate_xor_block function
hasn't been called while registering a raid5 volume; this leads to a
panic, as no checksumming function has been chosen.

Here's a tiny patch to restore that functionality, can you apply it?

Regards,
-- 
Jasper Spaans  <jasper@spaans.ds9a.nl>

diff -Nru linux-2.4.0-test11-pre6-orig/drivers/md/raid5.c linux-2.4.0-test11-pre6/drivers/md/raid5.c
--- linux-2.4.0-test11-pre6-orig/drivers/md/raid5.c	Fri Nov 17 23:21:18 2000
+++ linux-2.4.0-test11-pre6/drivers/md/raid5.c	Fri Nov 17 23:19:24 2000
@@ -2344,6 +2344,9 @@
 
 int raid5_init (void)
 {
+#ifndef MODULE
+	calibrate_xor_block();
+#endif
 	return register_md_personality (RAID5, &raid5_personality);
 }
 
diff -Nru linux-2.4.0-test11-pre6-orig/drivers/md/xor.c linux-2.4.0-test11-pre6/drivers/md/xor.c
--- linux-2.4.0-test11-pre6-orig/drivers/md/xor.c	Fri Nov 17 23:21:18 2000
+++ linux-2.4.0-test11-pre6/drivers/md/xor.c	Fri Nov 17 23:31:36 2000
@@ -98,7 +98,7 @@
 	       speed / 1000, speed % 1000);
 }
 
-static int
+int
 calibrate_xor_block(void)
 {
 	void *b1, *b2;
@@ -139,5 +139,6 @@
 }
 
 MD_EXPORT_SYMBOL(xor_block);
+MD_EXPORT_SYMBOL(calibrate_xor_block);
 
 module_init(calibrate_xor_block);
diff -Nru linux-2.4.0-test11-pre6-orig/include/linux/raid/xor.h linux-2.4.0-test11-pre6/include/linux/raid/xor.h
--- linux-2.4.0-test11-pre6-orig/include/linux/raid/xor.h	Fri Nov 17 23:21:48 2000
+++ linux-2.4.0-test11-pre6/include/linux/raid/xor.h	Fri Nov 17 23:33:03 2000
@@ -6,6 +6,7 @@
 #define MAX_XOR_BLOCKS 5
 
 extern void xor_block(unsigned int count, struct buffer_head **bh_ptr);
+extern int calibrate_xor_block(void);
 
 struct xor_block_template {
         struct xor_block_template *next;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-11-27 11:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-17 22:41 [PATCH] raid5 fix after xor.c cleanup Jasper Spaans
2000-11-18 11:35 ` Jasper Spaans
2000-11-18 22:53   ` [BUG] raid5 link error? (was [PATCH] raid5 fix after xor.c cleanup) Jasper Spaans
2000-11-20  0:41     ` Neil Brown
2000-11-26  2:26       ` [BUG] 2.4.0-test11-ac3 breaks raid autodetect (was Re: [BUG] raid5 link error? (was [PATCH] raid5 fix after xor.c cleanup)) Friedrich Lobenstock
2000-11-27  2:18         ` Neil Brown
2000-11-27  8:12           ` Luca Berra
2000-11-27 10:49           ` [KBUILD] " Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox