They use hard wired tests for filp->f_reada == DUMP_KIOBUF_NUMBER then
pass an AS_ parameter to the low level routine along with the kiobuf.
Not really a long term solution, every new use of kernel buffers would
require yet another test for f_reada.
>I'm actually working on the kiobuf code right now, mainly to separate
>out the locking of pages from the mapping of virtual addresses, and
>getting kernel VA mapping functions in place is one thing I'm merging.
The problem is that sd_raw_{read,write} can be called from kernel or
user space and those routines need some simple way of telling what
buffers their caller is using. What about a flag in the filp saying
"this filp uses kernel buffers"? Normal opens do not set it and use
user buffers, kernel code sets the flag and uses kernel buffers. That
would be a clean general solution.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/