Allow to exclude blockstore from OSD op processing for tests

blocking-uring-test
Vitaliy Filippov 2020-01-08 12:05:59 +03:00
parent ba23824561
commit 7dba43b3c6
2 changed files with 12 additions and 0 deletions

2
osd.h
View File

@ -33,6 +33,8 @@
#define CL_WRITE_DATA 3
#define MAX_EPOLL_EVENTS 16
//#define OSD_STUB
struct osd_op_t
{
int op_type;

View File

@ -63,7 +63,12 @@ void osd_t::exec_secondary(osd_op_t *cur_op)
cur_op->bs_op.len = cur_op->op.sec_list.pgtotal;
cur_op->bs_op.offset = cur_op->op.sec_list.pgnum;
}
#ifdef OSD_STUB
cur_op->bs_op.retval = cur_op->bs_op.len;
secondary_op_callback(cur_op);
#else
bs->enqueue_op(&cur_op->bs_op);
#endif
}
void osd_t::exec_show_config(osd_op_t *cur_op)
@ -122,7 +127,12 @@ void osd_t::exec_sync_stab_all(osd_op_t *cur_op)
secondary_op_callback(cur_op);
}
};
#ifdef OSD_STUB
cur_op->bs_op.retval = 0;
secondary_op_callback(cur_op);
#else
bs->enqueue_op(&cur_op->bs_op);
#endif
}
void osd_t::make_reply(osd_op_t *op)