[lkml]   [2000]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [BUG] 2.4.0-test11-ac3 breaks raid autodetect (was Re: [BUG] raid5 link error? (was [PATCH] raid5 fix after xor.c cleanup))
On Sunday November 26, wrote:
> Neil Brown wrote:
> >
> > The following patch changes the link order in the Makefile so that xor
> > is initiailised before md tries to autostart anything.
> > It also takes the theme a bit further and uses module_init/module_exit
> > to init and shutdown the raid personalities. This allows us to remove
> > the explicit calls to raidXX_init from md.c, which is nice.
> >
> > I have tested this patch both
> > 1/ monolithic kernel and autodetecting an array
> > 2/ md and all personalities modules
> >
> > and it works fine.
> Sorry to tell you that I just tried linux-2.4.0-test11-ac3 (which has this
> patch) and I couldn't boot because the kernel detects the raid1 devices
> but kicks the shortly after. I had to back out this code.

Thanks for this....

I have looked more deeply, and discovered the error of my ways.
As the Makefiles now stand, all export-objs (OX_OBJS) get linked
before non-export-objs (O_OBJS) in the same directory, independantly
of any ordering imposed within the Makefile.
This caused md.o to get linked before raid?.o.
Due to carelessness on my part I didn't notice this happening when I
was testing.

The following patch fixes it. I hope the change to Rules.make is
acceptable - I have CCed to linux-kbuild incase anyone there has an
issue with it.

Even allowing for that though, some of the boot-time messages look
very strange. Friedrich: could you let me know how the various
partitions were expected to be combined into raid arrays - from the
boot log, it looks like there are three single drive raid1 arrays, and
that doesn't seem to make much sense.


--- ./drivers/md/Makefile 2000/11/27 02:05:52 1.1
+++ ./drivers/md/Makefile 2000/11/27 02:09:42 1.2
@@ -28,6 +28,9 @@
# Translate to Rules.make lists.
O_OBJS := $(filter-out $(export-objs), $(obj-y))
OX_OBJS := $(filter $(export-objs), $(obj-y))
+# Need to maintain ordering between O_ and OX_ objects, so define ALL_O our selves
+ALL_O := $(obj-y)
M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))

--- ./Rules.make 2000/11/27 02:08:52 1.1
+++ ./Rules.make 2000/11/27 02:09:42 1.2
@@ -85,7 +85,9 @@
# Rule to compile a set of .o files into one .o file
ifdef O_TARGET
+ifndef ALL_O
+endif # ALL_O
rm -f $@
ifneq "$(strip $(ALL_O))" ""
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at
 \ /
  Last update: 2005-03-22 12:47    [W:0.048 / U:3.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site