pipe: allow passing around of ops private pointer
authorJens Axboe <jens.axboe@oracle.com>
Mon, 11 Jun 2007 10:00:45 +0000 (12:00 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 10 Jul 2007 06:04:14 +0000 (08:04 +0200)
relay needs this for proper consumption handling, and the network
receive support needs it as well to lookup the sk_buff on pipe
release.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/splice.c
include/linux/pipe_fs_i.h
include/linux/splice.h

index bea9f1581ca054339fb02260088b2c2a3b0ad142..00850e56280db9c972b6997c9c44b7f4b578e0a4 100644 (file)
@@ -185,6 +185,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
                        buf->page = spd->pages[page_nr];
                        buf->offset = spd->partial[page_nr].offset;
                        buf->len = spd->partial[page_nr].len;
+                       buf->private = spd->partial[page_nr].private;
                        buf->ops = spd->ops;
                        if (spd->flags & SPLICE_F_GIFT)
                                buf->flags |= PIPE_BUF_FLAG_GIFT;
index 7ba228d52f5872a1a43700437adf62be082fc81e..4409167b9eb2d89deb7e8768f7cae60223db48a9 100644 (file)
@@ -14,6 +14,7 @@ struct pipe_buffer {
        unsigned int offset, len;
        const struct pipe_buf_operations *ops;
        unsigned int flags;
+       unsigned long private;
 };
 
 struct pipe_inode_info {
index f8cc97f71cd09f1561b3415e24ed6688906eae9c..33e447f98a545c891192ab8b76acc78c92d6fc34 100644 (file)
@@ -41,6 +41,7 @@ struct splice_desc {
 struct partial_page {
        unsigned int offset;
        unsigned int len;
+       unsigned long private;
 };
 
 /*