Merge pull request #10344 from xiexingguo:xxg-wip-pipe-2016-07-19-02

msg/simple: apply prefetch policy more precisely

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Conflicts:
	src/msg/simple/Pipe.cc (removed unneeded cast)
This commit is contained in:
Josh Durgin 2016-08-01 15:40:39 -07:00
commit 98b9ed1d7c

View File

@ -2554,7 +2554,7 @@ ssize_t Pipe::buffered_recv(char *buf, size_t len, int flags)
/* nothing left in the prefetch buffer */
if (len > recv_max_prefetch) {
if (left > recv_max_prefetch) {
/* this was a large read, we don't prefetch for these */
ssize_t ret = do_recv(buf, left, flags );
if (ret < 0) {