if (crq2->requeued) 
if (cfq_crq_requeued(crq2)) 
cfq_choose_req(struct cfq_data *cfqd, struct cfq_rq *crq1, struct cfq_rq *crq2){	sector_t last, s1, s2, d1 = 0, d2 = 0;	int r1_wrap = 0, r2_wrap = 0;	/* requests are behind the disk head */	unsigned long back_max;	if (crq1 == NULL || crq1 == crq2)		return crq2;	if (crq2 == NULL)		return crq1;	if (crq1->requeued)		return crq1;	if (crq2->requeued)		return crq2;	s1 = crq1->request->sector;	s2 = crq2->request->sector;	last = cfqd->last_sector;	/*	 * by definition, 1KiB is 2 sectors	 */	back_max = cfqd->cfq_back_max * 2;	/*	 * Strict one way elevator _except_ in the case where we allow	 * short backward seeks which are biased as twice the cost of a	 * similar forward seek.	 */	if (s1 >= last)		d1 = s1 - last;	else if (s1 + back_max >= last)		d1 = (last - s1) * cfqd->cfq_back_penalty;	else		r1_wrap = 1;	if (s2 >= last)		d2 = s2 - last;	else if (s2 + back_max >= last)		d2 = (last - s2) * cfqd->cfq_back_penalty;	else		r2_wrap = 1;	/* Found required data */	if (!r1_wrap && r2_wrap)		return crq1;	else if (!r2_wrap && r1_wrap)		return crq2;	else if (r1_wrap && r2_wrap) {		/* both behind the head */		if (s1 <= s2)			return crq1;		else			return crq2;	}	/* Both requests in front of the head */	if (d1 < d2)		return crq1;	else if (d2 < d1)		return crq2;	else {		if (s1 >= s2)			return crq1;		else			return crq2;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/3b18152c327707ae6a2eeba4cfb66457143753bc/cfq-iosched.c/clean/drivers/block/cfq-iosched.c