if (rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER) && where == ELEVATOR_INSERT_SORT) where = ELEVATOR_INSERT_BACK;
if (rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)) {  if (where == ELEVATOR_INSERT_SORT) where = ELEVATOR_INSERT_BACK;   if (blk_fs_request(rq)) { q->last_sector = rq_last_sector(rq); q->boundary_rq = rq; } }
void __elv_add_request(request_queue_t *q, struct request *rq, int where,		       int plug){	/*	 * barriers implicitly indicate back insertion	 */	if (rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER) &&	    where == ELEVATOR_INSERT_SORT)		where = ELEVATOR_INSERT_BACK;	if (plug)		blk_plug_device(q);	rq->q = q;	if (!test_bit(QUEUE_FLAG_DRAIN, &q->queue_flags)) {		q->elevator->ops->elevator_add_req_fn(q, rq, where);		if (blk_queue_plugged(q)) {			int nrq = q->rq.count[READ] + q->rq.count[WRITE]				  - q->in_flight;			if (nrq >= q->unplug_thresh)				__generic_unplug_device(q);		}	} else		/*		 * if drain is set, store the request "locally". when the drain		 * is finished, the requests will be handed ordered to the io		 * scheduler		 */		list_add_tail(&rq->queuelist, &q->drain_list);}