2003-02-16 20:11:26

by Steve French

[permalink] [raw]
Subject: compile problem with 2.5.61-bk

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.


Thomas Molina wrote:
>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




2003-02-16 22:13:05

by Andrew Morton

[permalink] [raw]
Subject: Re: compile problem with 2.5.61-bk

Steve French <[email protected]> wrote:
>
> 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().