mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 02:50:33 +00:00
Trimmers may request buffers smaller than n_pages, the original value passed to allocate_large_and_trim(). That's why t.nr_page should be used as a final size of the allocated span. Another issue with the handling of span trimming is the order of operations when pages from the beginning of the buffer are trimmed. In such case span is updated to point to the actual beginning of the requested buffer, but afterwards it is used to retrieve span->span_size value which is expected to be the size of the originally allocated page span. Because the span pointer was changed the value is invalid and the trimming doesn't free all trimmed pages. Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
33 KiB
33 KiB