diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/unistd.h | 3 | ||||
| -rw-r--r-- | include/asm-ia64/asmmacro.h | 4 | ||||
| -rw-r--r-- | include/asm-ia64/unistd.h | 3 | ||||
| -rw-r--r-- | include/asm-powerpc/unistd.h | 3 | ||||
| -rw-r--r-- | include/asm-x86_64/unistd.h | 4 | ||||
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/pipe_fs_i.h | 8 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 2 |
8 files changed, 27 insertions, 4 deletions
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 014e3562895b..789e9bdd0a40 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
| @@ -318,8 +318,9 @@ | |||
| 318 | #define __NR_unshare 310 | 318 | #define __NR_unshare 310 |
| 319 | #define __NR_set_robust_list 311 | 319 | #define __NR_set_robust_list 311 |
| 320 | #define __NR_get_robust_list 312 | 320 | #define __NR_get_robust_list 312 |
| 321 | #define __NR_sys_splice 313 | ||
| 321 | 322 | ||
| 322 | #define NR_syscalls 313 | 323 | #define NR_syscalls 314 |
| 323 | 324 | ||
| 324 | /* | 325 | /* |
| 325 | * user-visible error numbers are in the range -1 - -128: see | 326 | * user-visible error numbers are in the range -1 - -128: see |
diff --git a/include/asm-ia64/asmmacro.h b/include/asm-ia64/asmmacro.h index d4cec32083d8..edf2cebb2969 100644 --- a/include/asm-ia64/asmmacro.h +++ b/include/asm-ia64/asmmacro.h | |||
| @@ -38,6 +38,10 @@ name: | |||
| 38 | 38 | ||
| 39 | /* | 39 | /* |
| 40 | * Helper macros for accessing user memory. | 40 | * Helper macros for accessing user memory. |
| 41 | * | ||
| 42 | * When adding any new .section/.previous entries here, make sure to | ||
| 43 | * also add it to the DISCARD section in arch/ia64/kernel/gate.lds.S or | ||
| 44 | * unpleasant things will happen. | ||
| 41 | */ | 45 | */ |
| 42 | 46 | ||
| 43 | .section "__ex_table", "a" // declare section & section attributes | 47 | .section "__ex_table", "a" // declare section & section attributes |
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 019956c613e4..36070c1014d8 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
| @@ -285,12 +285,13 @@ | |||
| 285 | #define __NR_faccessat 1293 | 285 | #define __NR_faccessat 1293 |
| 286 | /* 1294, 1295 reserved for pselect/ppoll */ | 286 | /* 1294, 1295 reserved for pselect/ppoll */ |
| 287 | #define __NR_unshare 1296 | 287 | #define __NR_unshare 1296 |
| 288 | #define __NR_splice 1297 | ||
| 288 | 289 | ||
| 289 | #ifdef __KERNEL__ | 290 | #ifdef __KERNEL__ |
| 290 | 291 | ||
| 291 | #include <linux/config.h> | 292 | #include <linux/config.h> |
| 292 | 293 | ||
| 293 | #define NR_syscalls 273 /* length of syscall table */ | 294 | #define NR_syscalls 274 /* length of syscall table */ |
| 294 | 295 | ||
| 295 | #define __ARCH_WANT_SYS_RT_SIGACTION | 296 | #define __ARCH_WANT_SYS_RT_SIGACTION |
| 296 | 297 | ||
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index 1e990747dce7..536ba0873052 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
| @@ -301,8 +301,9 @@ | |||
| 301 | #define __NR_pselect6 280 | 301 | #define __NR_pselect6 280 |
| 302 | #define __NR_ppoll 281 | 302 | #define __NR_ppoll 281 |
| 303 | #define __NR_unshare 282 | 303 | #define __NR_unshare 282 |
| 304 | #define __NR_splice 283 | ||
| 304 | 305 | ||
| 305 | #define __NR_syscalls 283 | 306 | #define __NR_syscalls 284 |
| 306 | 307 | ||
| 307 | #ifdef __KERNEL__ | 308 | #ifdef __KERNEL__ |
| 308 | #define __NR__exit __NR_exit | 309 | #define __NR__exit __NR_exit |
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index fcc516353087..f21ff2c1e960 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
| @@ -609,8 +609,10 @@ __SYSCALL(__NR_unshare, sys_unshare) | |||
| 609 | __SYSCALL(__NR_set_robust_list, sys_set_robust_list) | 609 | __SYSCALL(__NR_set_robust_list, sys_set_robust_list) |
| 610 | #define __NR_get_robust_list 274 | 610 | #define __NR_get_robust_list 274 |
| 611 | __SYSCALL(__NR_get_robust_list, sys_get_robust_list) | 611 | __SYSCALL(__NR_get_robust_list, sys_get_robust_list) |
| 612 | #define __NR_splice 275 | ||
| 613 | __SYSCALL(__NR_splice, sys_splice) | ||
| 612 | 614 | ||
| 613 | #define __NR_syscall_max __NR_get_robust_list | 615 | #define __NR_syscall_max __NR_splice |
| 614 | 616 | ||
| 615 | #ifndef __NO_STUBS | 617 | #ifndef __NO_STUBS |
| 616 | 618 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 408fe89498f4..20fa5f6d7269 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1032,6 +1032,8 @@ struct file_operations { | |||
| 1032 | int (*check_flags)(int); | 1032 | int (*check_flags)(int); |
| 1033 | int (*dir_notify)(struct file *filp, unsigned long arg); | 1033 | int (*dir_notify)(struct file *filp, unsigned long arg); |
| 1034 | int (*flock) (struct file *, int, struct file_lock *); | 1034 | int (*flock) (struct file *, int, struct file_lock *); |
| 1035 | ssize_t (*splice_write)(struct inode *, struct file *, size_t, unsigned int); | ||
| 1036 | ssize_t (*splice_read)(struct file *, struct inode *, size_t, unsigned int); | ||
| 1035 | }; | 1037 | }; |
| 1036 | 1038 | ||
| 1037 | struct inode_operations { | 1039 | struct inode_operations { |
| @@ -1609,6 +1611,8 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor | |||
| 1609 | extern void do_generic_mapping_read(struct address_space *mapping, | 1611 | extern void do_generic_mapping_read(struct address_space *mapping, |
| 1610 | struct file_ra_state *, struct file *, | 1612 | struct file_ra_state *, struct file *, |
| 1611 | loff_t *, read_descriptor_t *, read_actor_t); | 1613 | loff_t *, read_descriptor_t *, read_actor_t); |
| 1614 | extern ssize_t generic_file_splice_read(struct file *, struct inode *, size_t, unsigned int); | ||
| 1615 | extern ssize_t generic_file_splice_write(struct inode *, struct file *, size_t, unsigned int); | ||
| 1612 | extern void | 1616 | extern void |
| 1613 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 1617 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
| 1614 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, | 1618 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, |
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index b12e59c75752..75c7f55023ab 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
| @@ -9,6 +9,7 @@ struct pipe_buffer { | |||
| 9 | struct page *page; | 9 | struct page *page; |
| 10 | unsigned int offset, len; | 10 | unsigned int offset, len; |
| 11 | struct pipe_buf_operations *ops; | 11 | struct pipe_buf_operations *ops; |
| 12 | unsigned int stolen; | ||
| 12 | }; | 13 | }; |
| 13 | 14 | ||
| 14 | struct pipe_buf_operations { | 15 | struct pipe_buf_operations { |
| @@ -16,6 +17,7 @@ struct pipe_buf_operations { | |||
| 16 | void * (*map)(struct file *, struct pipe_inode_info *, struct pipe_buffer *); | 17 | void * (*map)(struct file *, struct pipe_inode_info *, struct pipe_buffer *); |
| 17 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); | 18 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); |
| 18 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); | 19 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); |
| 20 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); | ||
| 19 | }; | 21 | }; |
| 20 | 22 | ||
| 21 | struct pipe_inode_info { | 23 | struct pipe_inode_info { |
| @@ -53,4 +55,10 @@ void pipe_wait(struct inode * inode); | |||
| 53 | struct inode* pipe_new(struct inode* inode); | 55 | struct inode* pipe_new(struct inode* inode); |
| 54 | void free_pipe_info(struct inode* inode); | 56 | void free_pipe_info(struct inode* inode); |
| 55 | 57 | ||
| 58 | /* | ||
| 59 | * splice is tied to pipes as a transport (at least for now), so we'll just | ||
| 60 | * add the splice flags here. | ||
| 61 | */ | ||
| 62 | #define SPLICE_F_MOVE (0x01) /* move pages instead of copying */ | ||
| 63 | |||
| 56 | #endif | 64 | #endif |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index e487e3b60f60..e78ffc7d5b56 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -569,5 +569,7 @@ asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | |||
| 569 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | 569 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, |
| 570 | int flags, int mode); | 570 | int flags, int mode); |
| 571 | asmlinkage long sys_unshare(unsigned long unshare_flags); | 571 | asmlinkage long sys_unshare(unsigned long unshare_flags); |
| 572 | asmlinkage long sys_splice(int fdin, int fdout, size_t len, | ||
| 573 | unsigned int flags); | ||
| 572 | 574 | ||
| 573 | #endif | 575 | #endif |
