aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/midcomms.h
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2020-09-24 10:31:26 -0400
committerDavid Teigland <teigland@redhat.com>2020-09-29 14:00:32 -0500
commit4798cbbfbd00c498339bdcf4cc2429f53eb374ec (patch)
tree97d35239f9ce8c5a3453234629b7a5b54732cb53 /fs/dlm/midcomms.h
parent4e192ee68e5af301470a925b76700d788db35d96 (diff)
downloadlinux-4798cbbfbd00c498339bdcf4cc2429f53eb374ec.tar.gz
fs: dlm: rework receive handling
This patch reworks the current receive handling of dlm. As I tried to change the send handling to fix reorder issues I took a look into the receive handling and simplified it, it works as the following: Each connection has a preallocated receive buffer with a minimum length of 4096. On receive, the upper layer protocol will process all dlm message until there is not enough data anymore. If there exists "leftover" data at the end of the receive buffer because the dlm message wasn't fully received it will be copied to the begin of the preallocated receive buffer. Next receive more data will be appended to the previous "leftover" data and processing will begin again. This will remove a lot of code of the current mechanism. Inside the processing functionality we will ensure with a memmove() that the dlm message should be memory aligned. To have a dlm message always started at the beginning of the buffer will reduce some amount of memmove() calls because src and dest pointers are the same. The cluster attribute "buffer_size" becomes a new meaning, it's now the size of application layer receive buffer size. If this is changed during runtime the receive buffer will be reallocated. It's important that the receive buffer size has at minimum the size of the maximum possible dlm message size otherwise the received message cannot be placed inside the receive buffer size. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/midcomms.h')
-rw-r--r--fs/dlm/midcomms.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/dlm/midcomms.h b/fs/dlm/midcomms.h
index 2e122e81c8d0d..61e90a9218493 100644
--- a/fs/dlm/midcomms.h
+++ b/fs/dlm/midcomms.h
@@ -12,8 +12,7 @@
#ifndef __MIDCOMMS_DOT_H__
#define __MIDCOMMS_DOT_H__
-int dlm_process_incoming_buffer(int nodeid, const void *base, unsigned offset,
- unsigned len, unsigned limit);
+int dlm_process_incoming_buffer(int nodeid, unsigned char *buf, int buflen);
#endif /* __MIDCOMMS_DOT_H__ */