Re: splice methods in character device driver

From: Jens Axboe
Date: Sat Jun 13 2009 - 03:26:27 EST


On Sat, Jun 13 2009, Leon Woestenberg wrote:
> Hello Jens,
>
> On Mon, Jun 8, 2009 at 9:05 AM, Jens Axboe<jens.axboe@xxxxxxxxxx> wrote:
> > On Sat, Jun 06 2009, Leon Woestenberg wrote:
> >> How can I pass information from the splice_read(), which spawns a hardware
> >> DMA to the pages in my case, to the confirm() hook which is called at some
> >> (random) time in the future?
> >
> > There's a ->private for each pipe_buffer, so you can pass along info on
> > a per-page granularity.
> >
> So, this means in my driver's splice_read(), I must set
> pipe->bufs[i]->private for each 0 <= i < PIPE_BUFFERS?

Yes. There's no way to make it bigger granularity, since you could have
a mix of source pages in the pipe.

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/