Commit d6963615 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block

* 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] splice: fix page stealing LRU handling.
  [PATCH] splice: page stealing needs to wait_on_page_writeback()
  [PATCH] splice: export generic_splice_sendpage
  [PATCH] splice: add a SPLICE_F_MORE flag
  [PATCH] splice: add comments documenting more of the code
  [PATCH] splice: improve writeback and clean up page stealing
  [PATCH] splice: fix shadow[] filling logic
parents 1810b6cb 3e7ee3e7
...@@ -95,6 +95,8 @@ static void anon_pipe_buf_release(struct pipe_inode_info *info, struct pipe_buff ...@@ -95,6 +95,8 @@ static void anon_pipe_buf_release(struct pipe_inode_info *info, struct pipe_buff
{ {
struct page *page = buf->page; struct page *page = buf->page;
buf->flags &= ~PIPE_BUF_FLAG_STOLEN;
/* /*
* If nobody else uses this page, and we don't already have a * If nobody else uses this page, and we don't already have a
* temporary page, let's keep track of it as a one-deep * temporary page, let's keep track of it as a one-deep
...@@ -124,7 +126,7 @@ static void anon_pipe_buf_unmap(struct pipe_inode_info *info, struct pipe_buffer ...@@ -124,7 +126,7 @@ static void anon_pipe_buf_unmap(struct pipe_inode_info *info, struct pipe_buffer
static int anon_pipe_buf_steal(struct pipe_inode_info *info, static int anon_pipe_buf_steal(struct pipe_inode_info *info,
struct pipe_buffer *buf) struct pipe_buffer *buf)
{ {
buf->stolen = 1; buf->flags |= PIPE_BUF_FLAG_STOLEN;
return 0; return 0;
} }
......
This diff is collapsed.
...@@ -5,11 +5,14 @@ ...@@ -5,11 +5,14 @@
#define PIPE_BUFFERS (16) #define PIPE_BUFFERS (16)
#define PIPE_BUF_FLAG_STOLEN 0x01
#define PIPE_BUF_FLAG_LRU 0x02
struct pipe_buffer { struct pipe_buffer {
struct page *page; struct page *page;
unsigned int offset, len; unsigned int offset, len;
struct pipe_buf_operations *ops; struct pipe_buf_operations *ops;
unsigned int stolen; unsigned int flags;
}; };
struct pipe_buf_operations { struct pipe_buf_operations {
...@@ -63,5 +66,6 @@ void free_pipe_info(struct inode* inode); ...@@ -63,5 +66,6 @@ void free_pipe_info(struct inode* inode);
#define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */
/* we may still block on the fd we splice */ /* we may still block on the fd we splice */
/* from/to, of course */ /* from/to, of course */
#define SPLICE_F_MORE (0x04) /* expect more data */
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment