forked from Minki/linux
9f8f9c774a
This patch will set the maximum transmit buffer size for rcom messages with "names" to 4096 bytes. It's a leftover change of commit4798cbbfbd
("fs: dlm: rework receive handling"). Fact is that we cannot allocate a contiguous transmit buffer length above of 4096 bytes. It seems at some places the upper layer protocol will calculate according to dlm_config.ci_buffer_size the possible payload of a dlm recovery message. As compiler setting we will use now the maximum possible message which dlm can send out. Commit4e192ee68e
("fs: dlm: disallow buffer size below default") disallow a buffer setting smaller than the 4096 bytes and above 4096 bytes is definitely wrong because we will then write out of buffer space as we cannot allocate a contiguous buffer above 4096 bytes. The ci_buffer_size is still there to define the possible maximum receive buffer size of a recvmsg() which should be at least the maximum possible dlm message size. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
28 lines
1014 B
C
28 lines
1014 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/******************************************************************************
|
|
*******************************************************************************
|
|
**
|
|
** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
|
|
** Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
|
|
**
|
|
**
|
|
*******************************************************************************
|
|
******************************************************************************/
|
|
|
|
#ifndef __LOWCOMMS_DOT_H__
|
|
#define __LOWCOMMS_DOT_H__
|
|
|
|
#define LOWCOMMS_MAX_TX_BUFFER_LEN 4096
|
|
|
|
int dlm_lowcomms_start(void);
|
|
void dlm_lowcomms_stop(void);
|
|
void dlm_lowcomms_exit(void);
|
|
int dlm_lowcomms_close(int nodeid);
|
|
void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc);
|
|
void dlm_lowcomms_commit_buffer(void *mh);
|
|
int dlm_lowcomms_connect_node(int nodeid);
|
|
int dlm_lowcomms_addr(int nodeid, struct sockaddr_storage *addr, int len);
|
|
|
|
#endif /* __LOWCOMMS_DOT_H__ */
|
|
|