CVSROOT: /cvs/cluster Module name: cluster Changes by: [EMAIL PROTECTED] 2008-01-28 06:36:18
Modified files: gfs-kernel/src/gfs: ops_file.c Log message: fix gfs for the removal of sendfile and helper functions Sendfile and helper functions have been removed in 2.6.24. Migrate to using splice_read and generic_file_splice_read helper function. Signed-off-by: Phillip Lougher <[EMAIL PROTECTED]> Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_file.c.diff?cvsroot=cluster&r1=1.37&r2=1.38 --- cluster/gfs-kernel/src/gfs/ops_file.c 2008/01/24 20:54:31 1.37 +++ cluster/gfs-kernel/src/gfs/ops_file.c 2008/01/28 06:36:18 1.38 @@ -1633,13 +1633,12 @@ return gfs_lm_plock(sdp, &name, file, cmd, fl); } -#if 0 /** - * gfs_sendfile - Send bytes to a file or socket + * gfs_splice_read - Send bytes to a file or socket * @in_file: The file to read from * @out_file: The file to write to * @count: The amount of data - * @offset: The beginning file offset + * @ppos: The beginning file offset * * Outputs: offset - updated according to number of bytes read * @@ -1647,7 +1646,7 @@ */ static ssize_t -gfs_sendfile(struct file *in_file, loff_t *offset, size_t count, read_actor_t actor, void __user *target) +gfs_splice_read(struct file *in_file, loff_t *ppos, struct pipe_inode_info *pipe, size_t count, unsigned int flags) { struct gfs_inode *ip = get_v2ip(in_file->f_mapping->host); struct gfs_holder gh; @@ -1664,7 +1663,7 @@ if (gfs_is_jdata(ip)) retval = -ENOSYS; else - retval = generic_file_sendfile(in_file, offset, count, actor, target); + retval = generic_file_splice_read(in_file, ppos, pipe, count, flags); gfs_glock_dq(&gh); @@ -1673,7 +1672,6 @@ return retval; } -#endif /** * do_flock - Acquire a flock on a file @@ -1802,7 +1800,7 @@ .release = gfs_close, .fsync = gfs_fsync, .lock = gfs_lock, - /* .sendfile = gfs_sendfile, */ + .splice_read = gfs_splice_read, .flock = gfs_flock, };