Skip to contentSkip to conversation

compile problem with 2.5.61-bk

DISCUSSION Steve French 2 participants 2 messages Feb 16, 2003

lore
Share & tools
lore
#0 lore raw

Those two functions are not exported (see e.g. ksyms.c) so are not available for modules to access but work when built as part of the kernel.
For the time being this means the CIFS VFS can not be built as a module.
Looks like I will have to figure out an alternate way to get at those two
functions either directly by exporting them or preferably by calling them indirectly - there may be a way to change fs/cifs/file.c to use the similar
function read_cache_pages directly as nfs does (which presumably is an exported function) but it wasn't obvious at the time since the cifs vfs preferably reads the equivalent of 4 pages at a time (rather than one 4K page) across the network and the addition of support of readpages (with 16K reads in the readahead path) to the cifs vfs demonstrated a measurable performance benefit) even in the worst case (to loaded servers or on busy network segments the improvement would be more dramatic).

I will take a look at this later tonight to see if I can recode cifs_readpages to bypass the need for the additional exports.

Quoted 6 lines · Thomas Molina

After syncing with bk this morning I get the following errors during make modules

*** Warning: "add_to_page_cache" [fs/cifs/cifs.ko] undefined! *** Warning: "__pagevec_lru_add" [fs/cifs/cifs.ko] undefined!

which I don't understand since those items are defined in files included by fs/cifs/file.c

#1 lore raw
Quoted 7 lines · Steve French

Those two functions are not exported (see e.g. ksyms.c) so are not available for modules to access but work when built as part of the kernel. For the time being this means the CIFS VFS can not be built as a module. Looks like I will have to figure out an alternate way to get at those two functions either directly by exporting them or preferably by calling them indirectly

I think exporting them makes sense. In fact, given that ->readpages() is an address_space op, filesystems do have to be able to add these pages to pagecache.

It might be simpler to just use add_to_page_cache_lru(), and to export that instead. But that is a little more lock-intensive, and is equivalent to exporting add_to_page_cache() and __pagevec_lru_add().

btw, cifs_copy_cache_pages() can use the more efficient kmap_atomic(KM_USER0) in place of the kmap().