Skip to content
  • Alexander Aring's avatar
    9f8f9c77
    fs: dlm: define max send buffer · 9f8f9c77
    Alexander Aring authored
    
    
    This patch will set the maximum transmit buffer size for rcom messages
    with "names" to 4096 bytes. It's a leftover change of
    commit 4798cbbf ("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. Commit 4e192ee6 ("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: default avatarAlexander Aring <aahringo@redhat.com>
    Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
    9f8f9c77
    fs: dlm: define max send buffer
    Alexander Aring authored
    
    
    This patch will set the maximum transmit buffer size for rcom messages
    with "names" to 4096 bytes. It's a leftover change of
    commit 4798cbbf ("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. Commit 4e192ee6 ("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: default avatarAlexander Aring <aahringo@redhat.com>
    Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
Loading