From 78c95c94f6317a0060002c01e733e3a253c418ed Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sun, 20 Jul 2025 15:03:33 +0300 Subject: [PATCH] Use uint8_t* for BS buffers in OSD --- src/osd/osd_flush.cpp | 2 +- src/osd/osd_primary_subops.cpp | 8 ++++---- src/osd/osd_secondary.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/osd/osd_flush.cpp b/src/osd/osd_flush.cpp index 8a63fcee..431ee4ae 100644 --- a/src/osd/osd_flush.cpp +++ b/src/osd/osd_flush.cpp @@ -189,7 +189,7 @@ bool osd_t::submit_flush_op(pool_id_t pool_id, pg_num_t pg_num, pg_flush_batch_t { .len = (uint32_t)count, }, - .buf = op->buf, + .buf = (uint8_t*)op->buf, }); bs->enqueue_op(op->bs_op); } diff --git a/src/osd/osd_primary_subops.cpp b/src/osd/osd_primary_subops.cpp index 2c7fe5ba..e68228eb 100644 --- a/src/osd/osd_primary_subops.cpp +++ b/src/osd/osd_primary_subops.cpp @@ -209,8 +209,8 @@ void osd_t::submit_primary_subop(osd_op_t *cur_op, osd_op_t *subop, .offset = wr ? si->write_start : si->read_start, .len = subop_len, } }, - .buf = wr ? si->write_buf : si->read_buf, - .bitmap = si->bmp_buf, + .buf = (uint8_t*)(wr ? si->write_buf : si->read_buf), + .bitmap = (uint8_t*)si->bmp_buf, }); #ifdef OSD_DEBUG printf( @@ -702,7 +702,7 @@ void osd_t::submit_primary_stab_subops(osd_op_t *cur_op) { .len = (uint32_t)stab_osd.len, }, - .buf = (void*)(op_data->unstable_writes + stab_osd.start), + .buf = (uint8_t*)(op_data->unstable_writes + stab_osd.start), }); bs->enqueue_op(subops[i].bs_op); } @@ -789,7 +789,7 @@ void osd_t::submit_primary_rollback_subops(osd_op_t *cur_op, const uint64_t* osd { .len = 1, }, - .buf = (void*)(op_data->unstable_writes + i), + .buf = (uint8_t*)(op_data->unstable_writes + i), }); #ifdef OSD_DEBUG printf( diff --git a/src/osd/osd_secondary.cpp b/src/osd/osd_secondary.cpp index bdcf3ba6..e082f23d 100644 --- a/src/osd/osd_secondary.cpp +++ b/src/osd/osd_secondary.cpp @@ -161,8 +161,8 @@ void osd_t::exec_secondary_real(osd_op_t *cur_op) cur_op->bs_op->version = cur_op->req.sec_rw.version; cur_op->bs_op->offset = cur_op->req.sec_rw.offset; cur_op->bs_op->len = cur_op->req.sec_rw.len; - cur_op->bs_op->buf = cur_op->buf; - cur_op->bs_op->bitmap = cur_op->bitmap; + cur_op->bs_op->buf = (uint8_t*)cur_op->buf; + cur_op->bs_op->bitmap = (uint8_t*)cur_op->bitmap; #ifdef OSD_STUB cur_op->bs_op->retval = cur_op->bs_op->len; #endif @@ -186,7 +186,7 @@ void osd_t::exec_secondary_real(osd_op_t *cur_op) cur_op->req.hdr.opcode == OSD_OP_SEC_ROLLBACK) { cur_op->bs_op->len = cur_op->req.sec_stab.len/sizeof(obj_ver_id); - cur_op->bs_op->buf = cur_op->buf; + cur_op->bs_op->buf = (uint8_t*)cur_op->buf; #ifdef OSD_STUB cur_op->bs_op->retval = 0; #endif