Commit 9f3100e2 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Take offset rounding into account when rounding the length of segment

size.

Fixes: #1469
parent a43326dd
......@@ -219,6 +219,7 @@ smp_new_seg(struct smp_sc *sc)
sg->lru->flags |= LRU_F_DONTMOVE;
sg->p.offset = IRNUP(sc, sg->p.offset);
sg->p.length -= sg->p.offset - tmpsg.p.offset;
sg->p.length = IRNDN(sc, sg->p.length);
assert(sg->p.offset + sg->p.length <= tmpsg.p.offset + tmpsg.p.length);
sc->free_offset = sg->p.offset + sg->p.length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment