static void
deadline_add_rq_rb(struct deadline_data *dd, struct request *rq)
{
	struct rb_root *root = deadline_rb_root(dd, rq);

	elv_rb_add(root, rq);
}
Beispiel #2
0
static void
deadline_add_rq_rb(struct deadline_data *dd, struct request *rq)
{
	struct rb_root *root = deadline_rb_root(dd, rq);
	struct request *__alias;

	while (unlikely(__alias = elv_rb_add(root, rq)))
		deadline_move_request(dd, __alias);
}
static void fiops_add_rq_rb(struct request *rq)
{
	struct fiops_ioc *ioc = RQ_CIC(rq);
	struct fiops_data *fiopsd = ioc->fiopsd;

	elv_rb_add(&ioc->sort_list, rq);

	if (!fiops_ioc_on_rr(ioc))
		fiops_add_ioc_rr(fiopsd, ioc);
}
static void cscan_add_request(struct request_queue *q, struct request *rq)
{
	struct cscan_data *cd = q->elevator->elevator_data;
	struct rb_root *root;
        
    if(blk_rq_pos(rq) > cd->last_sector) {
		root = &(cd->sort_list[cd->curr]);
    } else {
		root = &(cd->sort_list[1-cd->curr]);
    }
	elv_rb_add(root, rq);
}
Beispiel #5
0
static void
deadline_add_rq_rb(struct deadline_data *dd, struct request *rq)
{
    struct rb_root *root = RQ_RB_ROOT(dd, rq);
    struct request *__alias;

retry:
    __alias = elv_rb_add(root, rq);
    if (unlikely(__alias)) {
        deadline_move_request(dd, __alias);
        goto retry;
    }
}
Beispiel #6
0
static void
vr_add_rq_rb(struct vr_data *vd, struct request *rq)
{
struct request *alias = elv_rb_add(&vd->sort_list, rq);

if (unlikely(alias)) {
vr_move_request(vd, alias);
alias = elv_rb_add(&vd->sort_list, rq);
BUG_ON(alias);
}

if (blk_rq_pos(rq) >= vd->last_sector) {
if (!vd->next_rq || blk_rq_pos(vd->next_rq) > blk_rq_pos(rq))
vd->next_rq = rq;
}
else {
if (!vd->prev_rq || blk_rq_pos(vd->prev_rq) < blk_rq_pos(rq))
vd->prev_rq = rq;
}

BUG_ON(vd->next_rq && vd->next_rq == vd->prev_rq);
BUG_ON(vd->next_rq && vd->prev_rq && blk_rq_pos(vd->next_rq) < blk_rq_pos(vd->prev_rq));
}
void ElvDeadline::deadline_add_rq_rb(request *rq)
{
	Rbtree *tree = RQ_RB_ROOT(rq);
	request *__alias;

retry:
	__alias = elv_rb_add(tree, rq);
	if (__alias) {
		/* TODO: move to dispatch queue */
		assert(0);
		deadline_move_request(__alias);
		goto retry;
	}
}
static void
vr_add_rq_rb(struct vr_data *vd, struct request *rq)
{
	elv_rb_add(&vd->sort_list, rq);

	if (blk_rq_pos(rq) >= vd->last_sector) {
		if (!vd->next_rq || blk_rq_pos(vd->next_rq) > blk_rq_pos(rq))
			vd->next_rq = rq;
	} else {
		if (!vd->prev_rq || blk_rq_pos(vd->prev_rq) < blk_rq_pos(rq))
			vd->prev_rq = rq;
	}

	BUG_ON(vd->next_rq && vd->next_rq == vd->prev_rq);
	BUG_ON(vd->next_rq && vd->prev_rq && blk_rq_pos(vd->next_rq) < blk_rq_pos(vd->prev_rq));
}