diff options
author | Alexander Aring <aahringo@redhat.com> | 2021-11-30 14:47:15 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2021-12-07 12:42:26 -0600 |
commit | bcbfea41e1f9d516faed1faf0f2d390c000bf0d9 (patch) | |
tree | bf03db700022fd8737bb5045009800ccd47894f9 /fs/dlm | |
parent | f70813d6a5fce7bde411272cfe1ab565a4254266 (diff) | |
download | linux-bcbfea41e1f9d516faed1faf0f2d390c000bf0d9.tar.gz linux-bcbfea41e1f9d516faed1faf0f2d390c000bf0d9.tar.bz2 linux-bcbfea41e1f9d516faed1faf0f2d390c000bf0d9.zip |
fs: dlm: check for pending users filling buffers
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>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/lowcomms.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index f7fc1ac76ce8..6d500ebc6145 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -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; |