From 8a1bbad8356d73d4cc6dbcffbc7cfb5f03be9da5 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sun, 2 Apr 2006 23:05:41 +0200 Subject: [PATCH] --- yaml --- r: 25311 b: refs/heads/master c: b2b39fa478db6db89b7ccafb0649973845b0eb75 h: refs/heads/master i: 25309: a7dea908d7739d218cfbb56913e87c6e1abd459a 25307: 7d158992d8c7f4e80dfd72fa7f5497e3fcd13935 25303: 85f8ee5c14f3d75e3c467799fe062f871110bd6b 25295: a64771c4ba6b124a54316b75d8123244e2625067 25279: dcc88a557493fa6ef8b9819660cedf5f2c28b22b v: v3 --- [refs] | 2 +- trunk/fs/splice.c | 5 +++-- trunk/include/linux/pipe_fs_i.h | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 3ceb8595a34b..9f576db46f6c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83f9135bddffded9f1716519b6c147bcf046c87e +refs/heads/master: b2b39fa478db6db89b7ccafb0649973845b0eb75 diff --git a/trunk/fs/splice.c b/trunk/fs/splice.c index 34591924c783..e84544558946 100644 --- a/trunk/fs/splice.c +++ b/trunk/fs/splice.c @@ -354,6 +354,7 @@ static int pipe_to_sendpage(struct pipe_inode_info *info, unsigned int offset; ssize_t ret; void *ptr; + int more; /* * sub-optimal, but we are limited by the pipe ->map. we don't @@ -366,9 +367,9 @@ static int pipe_to_sendpage(struct pipe_inode_info *info, return PTR_ERR(ptr); offset = pos & ~PAGE_CACHE_MASK; + more = (sd->flags & SPLICE_F_MORE) || sd->len < sd->total_len; - ret = file->f_op->sendpage(file, buf->page, offset, sd->len, &pos, - sd->len < sd->total_len); + ret = file->f_op->sendpage(file, buf->page, offset, sd->len, &pos,more); buf->ops->unmap(info, buf); if (ret == sd->len) diff --git a/trunk/include/linux/pipe_fs_i.h b/trunk/include/linux/pipe_fs_i.h index 32865004751c..70ae9332ec16 100644 --- a/trunk/include/linux/pipe_fs_i.h +++ b/trunk/include/linux/pipe_fs_i.h @@ -62,5 +62,6 @@ void free_pipe_info(struct inode* inode); #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ /* we may still block on the fd we splice */ /* from/to, of course */ +#define SPLICE_F_MORE (0x04) /* expect more data */ #endif