mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-05 23:42:09 +00:00
Check for the correct message size in totempg_groups_joined_reserve()
Currently: - send_reserve() adds to the reserve - msg_count_send_ok() tests ((avail - totempg_reserved) > msg_count) So essentially we are checking to see if 2 * msg_count can fit in the q. So instead I am using byte_count_send_ok (size) to see if the message will fit then calling send_reserve() Signed-off-by: Angus Salkeld <asalkeld@redhat.com> Reviewed-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
parent
2ba4ebe09e
commit
7b02f176df
@ -1251,13 +1251,12 @@ int totempg_groups_joined_reserve (
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
reserved = send_reserve (size);
|
||||
if (msg_count_send_ok (reserved) == 0) {
|
||||
send_release (reserved);
|
||||
if (byte_count_send_ok (size)) {
|
||||
reserved = send_reserve (size);
|
||||
} else {
|
||||
reserved = 0;
|
||||
}
|
||||
|
||||
|
||||
error_exit:
|
||||
check_q_level(instance);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user