Messages in this thread |  | | From | Daniil Tatianin <> | | Subject | [PATCH v2 0/2] printk_ringbuffer: don't needlessly wrap data blocks around | | Date | Fri, 5 Sep 2025 17:41:50 +0300 |
| |
This series fixes the issue where data blocks would wrap in cases where the last data block perfectly fits the ring. This caused whatever was at the beginning of the ring to get discarded in this case, and the data block would get put there even though it could be put at the end of the data ring just fine without discarding anything.
Fixing this issue also allows to simplify the check in data_check_size, previously it would ensure there's space for a trailing id, which we don't need anymore.
v0->v1: - Fix severely broken code alignment
v1->v2: - Rename & invert get_next_lpos -> is_blk_wrapped - Add a new commit for changing the logic in data_check_size
Daniil Tatianin (2): printk_ringbuffer: don't needlessly wrap data blocks around printk_ringbuffer: allow one data block to occupy the entire data ring
kernel/printk/printk_ringbuffer.c | 38 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 17 deletions(-)
-- 2.43.0
|  |