Bug 16174 - block devices won't build as modules: linux-2.2.16-sard.patch
Summary: block devices won't build as modules: linux-2.2.16-sard.patch
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: kernel (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: All Linux
Target Milestone: ---
Assignee: Dave Jones
QA Contact:
: 16136 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2000-08-14 17:12 UTC by Michael Tokarev
Modified: 2015-01-04 22:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-30 03:22:39 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
updated sard.patch for 2.2.16-22 (16.72 KB, patch)
2000-10-19 16:16 UTC, Michael Tokarev
no flags Details | Diff

Description Michael Tokarev 2000-08-14 17:12:31 UTC
In this patch (linux-2.2.16-sard.patch), there are some new
routines introduced in addition to standard ones in 2.2.16.
(kernel rpm 2.2.16-17, 2.2.16-21, maybe others).
Them are in drivers/block/ll_rw_blk.c at most.  But -- should
them be exported using EXPORT_SYMBOL()!?! :)
When I build hdd, scsi etc disk support as a module (by default
RedHat builds them to kernel), and attemtps to load that modules,
I get unresolved symbols, e.g. req_finished_io.
Here is a list of missing code in the end of drivers/block/ll_rw_blk.c
that should be in linux-2.2.16-sard.patch:


Actually I don't know if them are used -- it is just a list of all
non-static new routines.  req_finished_io _is_ used.

Ok, this situation seemed to trigger bug in modutils: depmod should
_not_ see that non-exported symbols, and should also complain about
unresolved symbols; but it generates modules.dep "correctly", and
only insmod/modprobe complains about unresolves when them fails to
load modules...  Uff, I spent a _lot_ of time searching why my modules
won't load! :(

And also one note about this patch (linux-2.2.16-sard.patch).
I don't know just how RedHat builds his binary rpms.  Previous
kernel rpm release (2.2.16-17) included that patch with
a typo (major_gendisks instead major_gendisk), resulting in
failed compilation!.  But I see compiled kernel-2.2.16-17.iXXX.rpm!
Wow!...  No comments on both facts...

I will not generate a patch here, since it will be itself against a
patch, and "patch for a patch" sounds just funny ... :)

Comment 1 Michael K. Johnson 2000-08-14 19:46:57 UTC
*** Bug 16136 has been marked as a duplicate of this bug. ***

Comment 2 Michael Tokarev 2000-10-19 16:16:47 UTC
Created attachment 4389 [details]
updated sard.patch for 2.2.16-22

Comment 3 Michael Tokarev 2000-10-19 16:20:34 UTC
I finally changed the patch for 2.2.16-22 kernel.  This is original
sard.patch applied with backup (-b -z .sard), with 3 EXPORT_SYMBOL
added to ll_rw_blk.c, and diffed against *.sard.  This also cleans
up some line numbers.  Is that so difficult to fix the problem? :)

Comment 4 Michael Tokarev 2000-10-19 17:08:16 UTC
This is another small set of changes as alternate to full sard.patch I attached
(my patch will not work on 2.2.16-24 due to differences with pcmcia).
Add this lines to the original _patch_ file at the end of changes for
linux/drivers/block/ll_rw_blk.c.  This can be done by hand.

--- cut ---
@@ -1143,3 +1282,6 @@
--- cut ---

(the changes will go to the end of ll_rw_blk.c file; the above lines
should be placed just before line "--- linux/drivers/block/ps2esdi.c.sard"
in 2.2.16-24).
I ask again: is this _so_ difficult ?!  Problem was reported
at 2000-08-14, now it is 2000-10-19, more than two months for
trivial problem! :(

BTW, as I can guess, this whole thing is for supporting sar, aka
system activity reporter (from sysstat package), right?  If so,
than the patch is not complete.  For example, even with this patch,
sar won't report activities for softraid and raw partitions/devices
(not pretty shure but it seemed to be so, at least for raw).

Note You need to log in before you can comment on or make changes to this bug.