[ltt-dev] [PATCH] nfs: add support for splice writes

Christoph Hellwig hch at infradead.org
Tue Apr 21 10:48:10 EDT 2009


On Mon, Apr 20, 2009 at 09:17:23PM +0530, Suresh Jayaraman wrote:
> +static ssize_t nfs_file_splice_write(struct pipe_inode_info *pipe,
> +				     struct file *filp, loff_t *ppos,
> +				     size_t count, unsigned int flags)
> +{
> +	struct dentry *dentry = filp->f_path.dentry;
> +
> +	dprintk("NFS splice_write(%s/%s, %lu@%Lu)\n",
> +		dentry->d_parent->d_name.name, dentry->d_name.name,
> +		(unsigned long) count, (unsigned long long) *ppos);
> +
> +	return generic_file_splice_write(pipe, filp, ppos, count, flags);
> +}
> +

You need all calls from nfs_file_write, too:

 - most importantly the nfs_revalidate_file_size for O_APPEND
 - the nfs_do_fsync for sync writes
 - probably the stats increment




More information about the lttng-dev mailing list