Skip to content

Commit

Permalink
fs: dlm: check for pending users filling buffers
Browse files Browse the repository at this point in the history
Currently we don't care if the DLM application stack is filling buffers
(not committed yet) while we transmit some already committed buffers.
By checking on active writequeue users before dequeue a writequeue entry
we know there is coming more data and do nothing. We wait until the send
worker will be triggered again if the writequeue entry users hit zero.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
  • Loading branch information
Alexander Aring authored and David Teigland committed Dec 7, 2021
1 parent f70813d commit bcbfea4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ static struct writequeue_entry *con_next_wq(struct connection *con)

e = list_first_entry(&con->writequeue, struct writequeue_entry,
list);
if (e->len == 0)
/* if len is zero nothing is to send, if there are users filling
* buffers we wait until the users are done so we can send more.
*/
if (e->users || e->len == 0)
return NULL;

return e;
Expand Down

0 comments on commit bcbfea4

Please sign in to comment.