mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] introduce a "kernel-internal pipe object" abstraction
separate out the 'internal pipe object' abstraction, and make it usable to splice. This cleans up and fixes several aspects of the internal splice APIs and the pipe code: - pipes: the allocation and freeing of pipe_inode_info is now more symmetric and more streamlined with existing kernel practices. - splice: small micro-optimization: less pointer dereferencing in splice methods Signed-off-by: Ingo Molnar <mingo@elte.hu> Update XFS for the ->splice_read/->splice_write changes. Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
0b749ce380
commit
3a326a2ce8
9 changed files with 114 additions and 106 deletions
|
@ -1039,8 +1039,8 @@ struct file_operations {
|
|||
int (*check_flags)(int);
|
||||
int (*dir_notify)(struct file *filp, unsigned long arg);
|
||||
int (*flock) (struct file *, int, struct file_lock *);
|
||||
ssize_t (*splice_write)(struct inode *, struct file *, size_t, unsigned int);
|
||||
ssize_t (*splice_read)(struct file *, struct inode *, size_t, unsigned int);
|
||||
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int);
|
||||
ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int);
|
||||
};
|
||||
|
||||
struct inode_operations {
|
||||
|
@ -1611,8 +1611,8 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor
|
|||
extern void do_generic_mapping_read(struct address_space *mapping,
|
||||
struct file_ra_state *, struct file *,
|
||||
loff_t *, read_descriptor_t *, read_actor_t);
|
||||
extern ssize_t generic_file_splice_read(struct file *, struct inode *, size_t, unsigned int);
|
||||
extern ssize_t generic_file_splice_write(struct inode *, struct file *, size_t, unsigned int);
|
||||
extern ssize_t generic_file_splice_read(struct file *, struct pipe_inode_info *, size_t, unsigned int);
|
||||
extern ssize_t generic_file_splice_write(struct pipe_inode_info *, struct file *, size_t, unsigned int);
|
||||
extern void
|
||||
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
|
||||
extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue