Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int clook_dispatch(struct request_queue *q, int force)
- {
- struct clook_data *nd = q->elevator->elevator_data;
- if (nd->next != NULL) {
- struct request *rq, *next;
- char *direction;
- rq = nd->next;
- nd->next = NULL;
- next = list_entry(rq->queuelist.next, struct request, queuelist);
- /* rq = list_entry(nd->queue.next, struct request, queuelist); */
- if(next)
- nd->next = next;
- list_del_init(&rq->queuelist);
- elv_dispatch_sort(q, rq);
- /* determin read or write */
- if(REQ_RW & rq->cmd_flags) {
- direction = "write";
- } else {
- direction = "read";
- }
- /* print so we can check order of actual dispatch */
- printk("[CLOOK] dis <%s> to <%lu>\n", direction, (unsigned long)rq->sector);
- return 1;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment