diff options
author | Jens Axboe <axboe@suse.de> | 2006-05-01 22:02:33 +0400 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-05-01 22:02:33 +0400 |
commit | 7afa6fd037e51e95d322990cb127bb2b1217251a (patch) | |
tree | dbe4052947bff32a6ada378576b8d7669c581cf4 /include/linux/pipe_fs_i.h | |
parent | f6762b7ad8edd6abc802542ce845d3bc8adcb92f (diff) | |
download | linux-7afa6fd037e51e95d322990cb127bb2b1217251a.tar.xz |
[PATCH] vmsplice: allow user to pass in gift pages
If SPLICE_F_GIFT is set, the user is basically giving this pages away to
the kernel. That means we can steal them for eg page cache uses instead
of copying it.
The data must be properly page aligned and also a multiple of the page size
in length.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include/linux/pipe_fs_i.h')
-rw-r--r-- | include/linux/pipe_fs_i.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 4c054491e38e..df4d3fa7d3dc 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h @@ -7,6 +7,7 @@ #define PIPE_BUF_FLAG_LRU 0x01 /* page is on the LRU */ #define PIPE_BUF_FLAG_ATOMIC 0x02 /* was atomically mapped */ +#define PIPE_BUF_FLAG_GIFT 0x04 /* page is a gift */ struct pipe_buffer { struct page *page; @@ -79,6 +80,7 @@ int generic_pipe_buf_pin(struct pipe_inode_info *, struct pipe_buffer *); /* we may still block on the fd we splice */ /* from/to, of course */ #define SPLICE_F_MORE (0x04) /* expect more data */ +#define SPLICE_F_GIFT (0x08) /* pages passed in are a gift */ /* * Passed to the actors |