Re: [patch 3/3] splice: implement default splice_read method

From: Brad Boyer
Date: Mon Mar 30 2009 - 17:00:31 EST


On Mon, Mar 30, 2009 at 10:04:28PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@xxxxxxx>
>
> 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.

Based on your description, I would have expected this patch to make
the loop driver work seamlessly. Unless I'm misreading something, I
think the loop driver will still error out if the fs driver in question
doesn't explicitly set splice_read.o

>From drivers/block/loop.c:
724 /* new backing store needs to support loop (eg splice_read) */
725 if (!inode->i_fop->splice_read)
726 goto out_putf;
727

Did you accidentally leave out some changes? Please let me know if I
am missing something obvious.

Brad Boyer
flar@xxxxxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/