lkml.org 
[lkml]   [2009]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: splice methods in character device driver
    From
    Hello Jens,

    On Mon, Jun 8, 2009 at 9:05 AM, Jens Axboe<jens.axboe@oracle.com> 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?


    struct pipe_buffer {
    ...
    unsigned long private;
    };
    struct pipe_inode_info {
    ...
    struct pipe_buffer bufs[PIPE_BUFFERS];
    };
    static int splice_read(..., struct pipe_inode_info *pipe, ...)

    Regards,
    --
    Leon


    \
     
     \ /
      Last update: 2009-06-13 00:09    [W:0.034 / U:1.132 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site