From: "Francis Moreau" <francis.moro@gmail.com>
To: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Trying to use splice from a driver
Date: Tue, 8 Jul 2008 21:52:53 +0200 [thread overview]
Message-ID: <38b2ab8a0807081252v1bd5a2e5xc7c384704c0ae9e6@mail.gmail.com> (raw)
Hello,
I'm trying to implement splice ops in a driver, specially the
splice_read method.
Basically the driver receives data and splice them to a pipe in order to
finally move the data to a file.
Before receiving the data, the driver allocates a free page by calling
alloc_page(). Then it fills it with the data received by the device and
then stores the page ref in the splice_pipe_desc structure. Once the
structure is initialised the driver calls splice_to_pipe.
Now the question is what am I supposed to use for pipe_buf_operations in
the splice_pipe_desc structure ?
I'm tempted to use 'user_page_pipe_buf_ops' but I'm not sure. Specially
for the release method, which points to page_cache_pipe_buf_release(),
since the allocated page (the os allocated by the driver) are not coming
from the page cache.
The same is actually true for vmsplice() where the pages are coming from
the user mem space (not from the page cache), so I'm probably missing
something...
Could aynbody enlight me ?
thanks,
--
Francis
reply other threads:[~2008-07-08 19:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38b2ab8a0807081252v1bd5a2e5xc7c384704c0ae9e6@mail.gmail.com \
--to=francis.moro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®