Bug 16174 - block devices won't build as modules: linux-2.2.16-sard.patch
block devices won't build as modules: linux-2.2.16-sard.patch
Status: CLOSED WONTFIX
Product: Red Hat Raw Hide
Classification: Retired
Component: kernel (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
:
: 16136 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-08-14 13:12 EDT by Michael Tokarev
Modified: 2015-01-04 17:01 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-29 23:22:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Michael Tokarev 2000-08-14 13:12:31 EDT
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:

 EXPORT_SYMBOL(disk_round_stats);
 EXPORT_SYMBOL(req_new_io);
 EXPORT_SYMBOL(req_finished_io);

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 15:46:57 EDT
*** Bug 16136 has been marked as a duplicate of this bug. ***
Comment 2 Michael Tokarev 2000-10-19 12:16:47 EDT
Created attachment 4389 [details]
updated sard.patch for 2.2.16-22
Comment 3 Michael Tokarev 2000-10-19 12:20:34 EDT
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 13:08:16 EDT
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 @@
 EXPORT_SYMBOL(end_that_request_first);
 EXPORT_SYMBOL(end_that_request_last);
 EXPORT_SYMBOL(blkelv_ioctl);
+EXPORT_SYMBOL(disk_round_stats);
+EXPORT_SYMBOL(req_new_io);
+EXPORT_SYMBOL(req_finished_io);
--- 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.