diff options
author | Zhang Huan <zhanghuan@open-fs.com> | 2018-12-29 16:26:58 +0800 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-01-22 06:52:30 +0000 |
commit | 4d9935a4db67be0237db5fc6a2b51086635571f6 (patch) | |
tree | c2a31fc43cb891fd6d9737adc8fec2fdc60e641c /tests/ec.rc | |
parent | 3c556353cd1dde0593096c9e9e11b877403971f0 (diff) |
socket: fix issue when socket read return with EAGAIN
In the case socket read returns EAGAIN, positive value about remaining
vector to send is returned. This return value will be passed all the way
back to event handler, making it complains.
[2018-12-29 08:02:25.603199] T [socket.c:1640:__socket_read_simple_payload] 0-test-client-0-extra.0: partial read on non-blocking socket.
[2018-12-29 08:02:25.603201] T [rpc-clnt.c:654:rpc_clnt_reply_init] 0-test-client-2-extra.1: received rpc message (RPC XID: 0xfa6 Program: GlusterFS 4.x v1, ProgVers: 400, Proc: 12) from rpc-transport (test-client-2-extra.1)
[2018-12-29 08:02:25.603207] T [socket.c:3129:socket_event_handler] 0-test-client-0-extra.0: (sock:32) socket_event_poll_in returned 1
Formerly, in socket_proto_state_machine, return value of socket_readv is
used to check if message is all read-in. In this commit, it is checked
whether size of bytes indicated in header are all read in. In this way,
only 0 and -1 will be returned from socket_proto_state_machine(),
indicating whether there is error in the underlying socket.
Change-Id: I8be0d178b049f0720d738a03aec41c4b375d2972
updates: bz#1666143
Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
Diffstat (limited to 'tests/ec.rc')
0 files changed, 0 insertions, 0 deletions