On Fri, Jun 01 2007, Neil Brown wrote: > > Ok, here is a patch that makes nfsd use splice instead of sendfile. > It appears to both compile and work. > > Some observations: > - __splice_from_pipe wants a "struct file*" and I wanted to pass a > "struct svcrqst *". Maybe it should take a void * ? > - It also wants a *ppos which I had no use for.. It that really > need? Cannot &file->f_pos be used?
See: http://git.kernel.dk/?p=linux-2.6-block.git;a=commitdiff;h=c73a9509ef7877d31e0c97c684ee8b7ed13ecbbe;hp=07f0e716250d4a3a550b2f39bd0a7e4e6566b3c2 I'll rebase the conversion on top of this one, loop will need the same change. > - I copied do_splice_to from splice.c as it wasn't exported, and > then found I couldn't compile because rw_verify_area wasn't > exported. As nfsd doesn't need that (we never export > mandatory-locking files) I just remove it and some other cruft > that I didn't need.... Not sure if that was the best approach. > - I needed to export alloc_pipe_info. Maybe there should be a > get_current_pipe instead which does the alloc if needed. > - I would much rather have something like free_pipe_info exported > than open code it in do_splice_read (which is based heavily on > do_splice_direct). I need the same thing for loop. I think I'll add do_splice_foo() to fs/splice.c in a way that loop can use instead of do_splice_direct(), then nfsd should be able to do the same. Thanks for this Neil! -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/