]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
buffer: make 0-length splice() a no-op
authorSage Weil <sage@inktank.com>
Tue, 28 Jan 2014 18:26:12 +0000 (10:26 -0800)
committerSage Weil <sage@inktank.com>
Tue, 28 Jan 2014 18:26:12 +0000 (10:26 -0800)
commitff5abfbdae07ae8a56fa83ebaa92000896f793c2
tree72f6d97c43315ea9cde0168a6538b631652b6e49
parent28c7388d320a47657c2e12c46907f1bf40672b08
buffer: make 0-length splice() a no-op

This was causing a problem in the Striper, but fixing it here will avoid
corner cases all over the tree.  Note that we have to bail out before
the end-of-buffer check to avoid hitting that check when the bufferlist is
also empty.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/common/buffer.cc
src/test/bufferlist.cc