Remove cryptic bitmap inlining from bs_op_t and osd_op_t, use bitmap in primary OSD code
This commit is contained in:
@@ -19,11 +19,6 @@ void osd_t::secondary_op_callback(osd_op_t *op)
|
||||
}
|
||||
if (op->req.hdr.opcode == OSD_OP_SEC_READ)
|
||||
{
|
||||
if (entry_attr_size > 0)
|
||||
{
|
||||
op->reply.sec_rw.attr_len = entry_attr_size;
|
||||
op->iov.push_back((entry_attr_size > sizeof(void*) ? op->bitmap : &op->bs_op->bitmap), entry_attr_size);
|
||||
}
|
||||
if (op->bs_op->retval > 0)
|
||||
{
|
||||
op->iov.push_back(op->buf, op->bs_op->retval);
|
||||
@@ -65,8 +60,10 @@ void osd_t::exec_secondary(osd_op_t *cur_op)
|
||||
if (cur_op->req.hdr.opcode == OSD_OP_SEC_READ)
|
||||
{
|
||||
// Allocate memory for the read operation
|
||||
if (entry_attr_size > sizeof(void*))
|
||||
if (entry_attr_size > sizeof(unsigned))
|
||||
cur_op->bitmap = cur_op->rmw_buf = malloc_or_die(entry_attr_size);
|
||||
else
|
||||
cur_op->bitmap = &cur_op->bmp_data;
|
||||
if (cur_op->req.sec_rw.len > 0)
|
||||
cur_op->buf = memalign_or_die(MEM_ALIGNMENT, cur_op->req.sec_rw.len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user