diff options
author | Noah Watkins <noahwatkins@gmail.com> | 2013-07-21 17:08:53 -0700 |
---|---|---|
committer | Noah Watkins <noahwatkins@gmail.com> | 2013-09-17 10:41:18 -0700 |
commit | 4fcf4b14a73a4ca517c4e27a1014d36bdad52992 (patch) | |
tree | b50797f411964318d17bf16a8e5d8229f4dec073 | |
parent | 19ab35389a33defa530c2592d6c0eb1aa4fe117a (diff) | |
download | ceph-4fcf4b14a73a4ca517c4e27a1014d36bdad52992.tar.gz |
Pipe: do not use MSG_MORE on OSX
MSG_MORE is not available on OSX, and unlike MSG_NOSIGNAL, there doesn't
appear to be an equivalent. It is not clear if MSG_MORE effects
correctness or is just an optimization.
If the MSG_MORE semantics are required for correctness, we may be able
to use TCP_CORK to do this on OSX.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
-rw-r--r-- | src/msg/Pipe.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/msg/Pipe.cc b/src/msg/Pipe.cc index 1317bbbe20c..28a40308162 100644 --- a/src/msg/Pipe.cc +++ b/src/msg/Pipe.cc @@ -1920,7 +1920,11 @@ int Pipe::do_sendmsg(struct msghdr *msg, int len, bool more) assert(l == len); } +#ifdef MSG_MORE int r = ::sendmsg(sd, msg, MSG_NOSIGNAL | (more ? MSG_MORE : 0)); +#else + int r = ::sendmsg(sd, msg, MSG_NOSIGNAL); +#endif if (r == 0) ldout(msgr->cct,10) << "do_sendmsg hmm do_sendmsg got r==0!" << dendl; if (r < 0) { |