Summary: glusterfsd - all socket operations should be
ensured not to block
Submitted by: avati
Submitted on: Monday 08/07/2006 at 12:52
Severity: 4 - Important
Priority: 5 - Normal
Item Group: Improper behaviour
Assigned to: amarts
Operating System: GNU/Linux
all read/write operations on sockets should be ensured not to block.
currently all read()s happen after poll(). But all write() (reply from fops)
happen without check, which can possibly lead to blocking indefinitely.
all socket operations should happen with a poll() check for both write and
all FILE * operations should be changed and should use the transport api's
being added (tracked by #17354) which uses socket fd directly.
the non-blocking write may involve implementing a write queue which is
flushed after poll() indicates write-ready.
Over clogging of the write-queue should be ensured by not read()ing from a
socket which has N write-queue entries. (do not process requests from a
socket which has not accepted the previous replies)