ChangeLog from git://git.bogomips.org/ruby_io_splice.git (v1.0.0..v2.2.0) commit fd4ee32882f8c59b085f097dbb2d143c9086a255 Author: Eric Wong Date: Mon Aug 2 07:55:57 2010 +0000 Ruby io_splice 2.2.0 - updates for Linux 2.6.35 This release adds IO#pipe_size and IO#pipe_size= accessors for resizing the kernel pipe buffer under Linux 2.6.35+. This functionality may be used to either reduce memory footprint or make large copies with fewer method dispatches and system calls. These methods are only available when run under Linux 2.6.35 or later (but always built, so there's no need to recompile this library after upgrading your kernel). http://bogomips.org/ruby_io_splice/doc/IO.html#method-i-pipe_size http://bogomips.org/ruby_io_splice/doc/IO.html#method-i-pipe_size%3D commit a6a3ba543c3b9069437ade7741c694ce3da2e884 Author: Eric Wong Date: Mon Aug 2 07:40:48 2010 +0000 add IO#pipe_size and IO#pipe_size= accessors These are friendly wrappers around F_GETPIPE_SZ and F_SETPIPE_SZ fcntl()s in Linux 2.6.35. commit dcd710c622530052be50b226d245caebb6d2a970 Author: Eric Wong Date: Thu Jun 24 18:46:14 2010 +0000 test_io_splice: fix broken test Apparently timing variations were allowing it to succeed under Ruby 1.8/1.9, but Rubinius tripped and exposed the bug. commit 52ec5be1ba9768499b948186589c1404ccc64724 Author: Eric Wong Date: Sun Jun 6 20:27:36 2010 +0000 Ruby io_splice 2.1.0 - IO::Splice.copy_stream fixes This fixes the issue with our copy_stream where non-pipe descriptors with the O_NONBLOCK flag set were not handled correctly. Like IO.copy_stream in Ruby 1.9, our IO::Splice.copy_stream will _always_ block until IO is available (or raise if there are errors). IO::Splice.copy_stream now closes all file descriptors that were opened within the method, reducing pressure on the garbage collector. There are also new singleton convenience methods: * IO::Splice.full - blocks and splices the full amount * IO::Splice.partial - blocks until something is spliceable They are used internally to implement IO::Splice.copy_stream, but may also be useful to end users. Rcov shows 100% test coverage \o/ commit 1db6afb8369cafdfe05680798ee68fe3081251d2 Author: Eric Wong Date: Sun Jun 6 20:26:37 2010 +0000 doc: help RDoc read IO::Splice singleton methods commit a2026eae297ee6b911b77d07e1d96a0136e1a114 Author: Eric Wong Date: Sun Jun 6 19:49:12 2010 +0000 document +src+ and +dst+ for IO::Splice.{full,partial} Unlike IO::Splice.copy_stream, these require at least one of the source or destination parameters to be a pipe. commit be048fd9d58604feb7aed434a53b5abd694c06f2 Author: Eric Wong Date: Sun Jun 6 19:46:05 2010 +0000 GNUmakefile: add rcov target commit 87332294a9cb7e3ce426050a7c949569200a4f01 Author: Eric Wong Date: Sun Jun 6 19:21:42 2010 +0000 copy_stream: handle and block on EAGAIN from the non-pipe IO splice(2) (called without SPLICE_F_NONBLOCK) only blocks on the pipe descriptor, but may trigger EAGAIN from the non-pipe descriptor. So use IO.select to deal with the case where the non-pipe descriptor is non-blocking and wait on it. While we're at it, add the IO::Splice.partial and IO::Splice.full singleton methods to make our life easier to implement copy_stream with. These methods may also be used directly by users who may find them useful. commit e86706ab91e3d44297f03d1d9428968e237a1d2a Author: Eric Wong Date: Sun Jun 6 19:21:17 2010 +0000 GNUmakefile: allow passing options to test/unit commit a301f99563deeb03c93d275330e20ff672519680 Author: Eric Wong Date: Sun Jun 6 17:59:10 2010 +0000 copy_stream: cleanup after ourselves It's a good idea to clean up any file descriptors opened within our method to avoid unnecessary GC invocations. commit 8aab8c93421519f0ad33ab7d7c5049e12a1362b3 Author: Eric Wong Date: Sun Jun 6 06:50:10 2010 +0000 COPYING: bundle the LGPLv2.1 instead of LGPLv3 The choice of version is up to the user, but bundle the one more likely to be invoked. commit 2b95ba46ee144eb3a22054ae98a6416996136469 Author: Eric Wong Date: Sat Jun 5 08:36:16 2010 +0000 Ruby io_splice 2.0.0 There is a new IO::Splice.copy_stream method which is similar to the IO.copy_stream method in 1.9 core, but uses splice() internally to avoid copies to userspace in situations where sendfile() is not possible. With Linux 2.6.35 (and header files to match), we will also export the F_GETPIPE_SZ and and F_SETPIPE_SZ constants so they can be used with fcntl() to resize pipe buffers. The documentation is also updated to reflect the returned usefulness of the IO::Splice::F_MOVE constant for FUSE filesystems under Linux 2.6.35. I've also relicensed to LGPLv2.1+ (from LGPLv3-only) to allow bundling with GPLv2-only applications (I'm currently the sole copyright holder). Signed-off-by: Eric Wong commit 901e6061348490b3ea5d1e08be5b08c9601ad310 Author: Eric Wong Date: Sat Jun 5 08:34:17 2010 +0000 update PIPE_CAPA documentation for Linux 2.6.35 commit 70efa04bf48a3187e60d0f459b6a4202fb0885b2 Author: Eric Wong Date: Sat Jun 5 08:22:19 2010 +0000 relicense to LGPLv2.1+ (from LGPLv3 only) This allows GPLv2-only programs to bundle us. Signed-off-by: Eric Wong commit b755f909f88c3954d421437e54eb465be74df652 Author: Eric Wong Date: Sat Jun 5 06:27:24 2010 +0000 GNUmakefile: make our unit tests PHONY commit 70c9bdf4ef12212a99a50ffb1284287920953a06 Author: Eric Wong Date: Sat Jun 5 06:19:17 2010 +0000 examples/splice-cp: simplify with IO::Splice.copy_stream commit fc64ffe36d831c1a29a603a1a1ad50b7b68d55e8 Author: Eric Wong Date: Sat Jun 5 06:02:30 2010 +0000 io_splice_ext: require errno.h It seems needed for Rubinius commit e8b06376c21a74e3fc2e6e9ace4eda8b2359ab62 Author: Eric Wong Date: Sat Jun 5 05:42:54 2010 +0000 copy_stream takes source offset like the non-splice version This should make it a drop-in replacement for IO.copy_stream, except it won't deal with things like StringIO. commit 5e222a0cedd7146bdc2b0f07d5c36ce7f38b740e Author: Eric Wong Date: Thu Jun 3 07:00:43 2010 +0000 allow IO.vmsplice to take a single string This could be useful if a Ruby implementation eventually gives us page-aligned strings that we can IO::Splice::F_GIFT commit 01ced6c651db7694ecb73fbaa145d319f0b1e15d Author: Eric Wong Date: Tue Jun 1 16:59:57 2010 -0700 copy_stream: always try to move pages instead of copying For most case in the forseeable future it's a no-op, but since FUSE will support it in 2.6.35, some folks will be able to use it again. commit bb6791da7cf37e326846edc44a7c32b79021f9da Author: Eric Wong Date: Tue Jun 1 16:54:24 2010 -0700 preliminary support for F_GETPIPE_SZ and F_SETPIPE_SZ One day soon (2.6.35), we'll be able to resize pipes. We may support this independently of the C library since that can take a few months/years to catch up, taking distro release cycles into account, too. commit e4bdec2a41932a6ebd444d003f21cc025223cfdd Author: Eric Wong Date: Tue Jun 1 16:46:18 2010 -0700 update IO::Splice::F_MOVE documentation for 2.6.35 FUSE devices will finally gain splice() support and also support SPLICE_F_MOVE in 2.6.35. SPLICE_F_MOVE is still ignored for non-FUSE devices. commit 5b34f7048cae6161c5180f57074272d558373133 Author: Eric Wong Date: Tue Jun 1 16:08:46 2010 -0700 simplify examples for 1.0.0 API commit ecb5f27598a6f53b6e02817bb0c1644fc4c75f09 Author: Eric Wong Date: Tue Jun 1 16:01:58 2010 -0700 implement IO::Splice.copy_stream This is like IO.copy_stream in Ruby 1.9, but uses the splice() system call internally. commit 09ae46671a8829dbc2fba3ec8f2de9127e3c3315 Author: Eric Wong Date: Fri Mar 12 16:21:01 2010 -0800 fix indentation bug