If queue_pos == header.max_size when we create the entry
header magic, the entry will be rejected at get_top() on
replay.
Fixes: #4436
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit
de8edb732e3a5ce4471670e43cfe6357ae6a2758)
writing_seq = seq;
queue_pos += size;
- if (queue_pos > header.max_size)
+ if (queue_pos >= header.max_size)
queue_pos = queue_pos + get_top() - header.max_size;
return 0;