[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:
Ingo Molnar
2006-04-10 15:18:35 +02:00
committed by Jens Axboe
parent 0b749ce380
commit 3a326a2ce8
9 changed files with 114 additions and 106 deletions

View File

@@ -252,7 +252,7 @@ xfs_file_sendfile_invis(
STATIC ssize_t
xfs_file_splice_read(
struct file *infilp,
struct inode *pipe,
struct pipe_inode_info *pipe,
size_t len,
unsigned int flags)
{
@@ -266,7 +266,7 @@ xfs_file_splice_read(
STATIC ssize_t
xfs_file_splice_read_invis(
struct file *infilp,
struct inode *pipe,
struct pipe_inode_info *pipe,
size_t len,
unsigned int flags)
{
@@ -279,7 +279,7 @@ xfs_file_splice_read_invis(
STATIC ssize_t
xfs_file_splice_write(
struct inode *pipe,
struct pipe_inode_info *pipe,
struct file *outfilp,
size_t len,
unsigned int flags)
@@ -293,7 +293,7 @@ xfs_file_splice_write(
STATIC ssize_t
xfs_file_splice_write_invis(
struct inode *pipe,
struct pipe_inode_info *pipe,
struct file *outfilp,
size_t len,
unsigned int flags)

View File

@@ -338,7 +338,7 @@ ssize_t
xfs_splice_read(
bhv_desc_t *bdp,
struct file *infilp,
struct inode *pipe,
struct pipe_inode_info *pipe,
size_t count,
int flags,
int ioflags,
@@ -380,7 +380,7 @@ xfs_splice_read(
ssize_t
xfs_splice_write(
bhv_desc_t *bdp,
struct inode *pipe,
struct pipe_inode_info *pipe,
struct file *outfilp,
size_t count,
int flags,

View File

@@ -94,9 +94,9 @@ extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *,
loff_t *, int, size_t, read_actor_t,
void *, struct cred *);
extern ssize_t xfs_splice_read(struct bhv_desc *, struct file *,
struct inode *, size_t, int, int,
struct pipe_inode_info *, size_t, int, int,
struct cred *);
extern ssize_t xfs_splice_write(struct bhv_desc *, struct inode *,
extern ssize_t xfs_splice_write(struct bhv_desc *, struct pipe_inode_info *,
struct file *, size_t, int, int,
struct cred *);

View File

@@ -174,9 +174,9 @@ typedef ssize_t (*vop_sendfile_t)(bhv_desc_t *, struct file *,
loff_t *, int, size_t, read_actor_t,
void *, struct cred *);
typedef ssize_t (*vop_splice_read_t)(bhv_desc_t *, struct file *,
struct inode *, size_t, int, int,
struct pipe_inode_info *, size_t, int, int,
struct cred *);
typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct inode *,
typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct pipe_inode_info *,
struct file *, size_t, int, int,
struct cred *);
typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *,