]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: drop last_piece logic from write_partial_message_data()
authorIlya Dryomov <idryomov@gmail.com>
Wed, 14 Nov 2018 11:24:01 +0000 (12:24 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 26 Dec 2018 14:56:04 +0000 (15:56 +0100)
commit51280b51fa162a52e090d63677475b309529a9cd
tree0b40e4c8496c1d8648bf35db04f7c4939795c3dc
parent2778dbf4a9a83158af463252b3d99abe2de027c3
libceph: drop last_piece logic from write_partial_message_data()

last_piece is for the last piece in the current data item, not in the
entire data payload of the message.  This is harmful for messages with
multiple data items.  On top of that, we don't need to signal the end
of a data payload either because it is always followed by a footer.

We used to signal "more" unconditionally, until commit 90acdc1efbee
("libceph: start defining message data cursor").  Part of a large
series, it introduced cursor->last_piece and also mistakenly inverted
the hint by passing last_piece for "more".  This was corrected with
commit fb78152d7c9e ("libceph: Fix ceph_tcp_sendpage()'s more boolean
usage").

As it is, last_piece is not helping at all: because Nagle algorithm is
disabled, for a simple message with two 512-byte data items we end up
emitting three packets: front + first data item, second data item and
footer.  Go back to the original pre-90acdc1efbee behavior -- a single
packet in most cases.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
net/ceph/messenger.c