Messages in this thread | | | Date | Tue, 4 Apr 2006 19:34:49 +0200 | From | Jens Axboe <> | Subject | Re: [PATCH] splice support #2 |
| |
On Tue, Apr 04 2006, Andy Lutomirski wrote: > Jens Axboe wrote: > >On Fri, Mar 31 2006, Linus Torvalds wrote: > > > >> > >>On Fri, 31 Mar 2006, Jens Axboe wrote: > >> > >>>> ssize_t psplice(int fdin, int fdout, size_t len, off_t ofs, unsigned > >>>> flags); > >>> > >>>I definitely see some valid reasons for adding a file offset instead of > >>>using ->f_pos, I'll leave that decision up to Linus though. Linus? > >> > >>I think a file offset is fine, the one thing holding me back was just the > >>interface. One file offset per fd? Or just have the rule that the file > >>offset is for the "non-pipe" device? > > > > > >Intuitively, I'd expect the offset to be tied to the non-pipe if I were > >to eg see this for the first time. So my vote would go for that. > > > > Eee! That means that splice(file_fd, pipe_fd, 1000) and splice(pipe_fd, > file_fd, 1000) have different semantics. It also would seem to prevent > ever implementing direct file-to-file splicing.
The semantics as written: (fdin, fdout, len). But yes the offset gets ugly, unless you add two offsets. And you are right it would not go well with file -> file splicing, which btw is already implemented (just not in 2.6.17-rc1) along with file -> socket.
-- Jens Axboe
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |