splice: implement default splice_read method
authorMiklos Szeredi <miklos@szeredi.hu>
Thu, 7 May 2009 13:37:36 +0000 (15:37 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 11 May 2009 12:13:10 +0000 (14:13 +0200)
commit6818173bd658439b83896a2a7586f64ab51bf29c
tree17d25ee77485af18da1a80cb7f1d8ec581c6abfc
parent7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d
splice: implement default splice_read method

If f_op->splice_read() is not implemented, fall back to a plain read.
Use vfs_readv() to read into previously allocated pages.

This will allow splice and functions using splice, such as the loop
device, to work on all filesystems.  This includes "direct_io" files
in fuse which bypass the page cache.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/loop.c
fs/coda/file.c
fs/pipe.c
fs/read_write.c
fs/splice.c
include/linux/fs.h
include/linux/pipe_fs_i.h