static struct io *alloc_io(struct store *store)
{
- xqindex idx = xq_pop_head(&store->free_ops);
- if (idx == None)
+ xqindex idx = xq_pop_head(&store->free_ops, 1);
+ if (idx == Noneidx)
return NULL;
return store->ios + idx;
}
{
xqindex idx = io - store->ios;
io->req = NULL;
- xq_append_head(&store->free_ops, idx);
+ xq_append_head(&store->free_ops, idx, 1);
/* not the right place. sosd_loop couldn't sleep because of that
* needed for flush support. maybe this should go to complete function
*
static void resubmit_io(struct store *store, struct io *io)
{
xqindex idx = io - store->ios;
- xq_append_tail(&store->resubmit_ops, idx);
+ xq_append_tail(&store->resubmit_ops, idx, 1);
}
static struct io* get_resubmitted_io(struct store *store)
{
- xqindex idx = xq_pop_head(&store->resubmit_ops);
- if (idx == None)
+ xqindex idx = xq_pop_head(&store->resubmit_ops, 1);
+ if (idx == Noneidx)
return NULL;
return store->ios + idx;
}