diff options
author | Alexander Aring <aahringo@redhat.com> | 2021-06-02 15:45:20 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2021-06-02 18:53:04 +0200 |
commit | d10a0b88751a0954c14e11fd988da00d3b0d5445 (patch) | |
tree | 0c1a258735769700f4363fbb74fb398b031fbc27 /fs/dlm/midcomms.c | |
parent | fs: dlm: introduce proto values (diff) | |
download | linux-d10a0b88751a0954c14e11fd988da00d3b0d5445.tar.xz linux-d10a0b88751a0954c14e11fd988da00d3b0d5445.zip |
fs: dlm: rename socket and app buffer defines
This patch renames DEFAULT_BUFFER_SIZE to DLM_MAX_SOCKET_BUFSIZE and
LOWCOMMS_MAX_TX_BUFFER_LEN to DLM_MAX_APP_BUFSIZE as they are proper
names to define what's behind those values. The DLM_MAX_SOCKET_BUFSIZE
defines the maximum size of buffer which can be handled on socket layer,
the DLM_MAX_APP_BUFSIZE defines the maximum size of buffer which can be
handled by the DLM application layer.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/midcomms.c')
-rw-r--r-- | fs/dlm/midcomms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c index 4e36e418b6bf..7d217234b697 100644 --- a/fs/dlm/midcomms.c +++ b/fs/dlm/midcomms.c @@ -865,7 +865,7 @@ int dlm_process_incoming_buffer(int nodeid, unsigned char *buf, int len) while (len >= sizeof(struct dlm_header)) { hd = (struct dlm_header *)ptr; - /* no message should be more than DEFAULT_BUFFER_SIZE or + /* no message should be more than DLM_MAX_SOCKET_BUFSIZE or * less than dlm_header size. * * Some messages does not have a 8 byte length boundary yet @@ -877,7 +877,7 @@ int dlm_process_incoming_buffer(int nodeid, unsigned char *buf, int len) * the next major version bump. */ msglen = le16_to_cpu(hd->h_length); - if (msglen > DEFAULT_BUFFER_SIZE || + if (msglen > DLM_MAX_SOCKET_BUFSIZE || msglen < sizeof(struct dlm_header)) { log_print("received invalid length header: %u from node %d, will abort message parsing", msglen, nodeid); |