Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: basspenguin/cs411-g3
...
head fork: basspenguin/cs411-g3
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 10 additions and 5 deletions.
  1. +10 −5 linux-2.6.34.7-dev/block/clook-iosched.c
View
15 linux-2.6.34.7-dev/block/clook-iosched.c
@@ -53,7 +53,12 @@ static int clook_dispatch(struct request_queue *q, int force)
cur = list_entry(cur->queuelist.next, struct request, queuelist);
}
- printk("[CLOOK] dsp <%s> <Sector:%d>\n", (rq_data_dir(cd->cur_request) == 1 ? "Write" : "Read"), (int)blk_rq_pos(cd->cur_request));
+ /*
+ printk("[CLOOK] dsp <%s> <Sector:%d>\n",
+ (rq_data_dir(list_entry(cd->cur_request, struct request, queuelist)) == 1 ? "Write" : "Read"),
+ (int)blk_rq_pos(list_entry(cd->cur_request, struct request, queuelist)));
+ */
+
list_del_init(cd->cur_request);
elv_dispatch_add_tail(q, list_entry(cd->cur_request, struct request, queuelist));
cd->cur_request = &cur->queuelist;
@@ -73,19 +78,19 @@ static void clook_add_request(struct request_queue *q, struct request *rq)
* We found a valid position.
*/
if ( blk_rq_pos(rq) < blk_rq_pos(ex_req) ){
- list_add_tail(rq,ex_req)
+ list_add_tail(&rq->queuelist,&ex_req->queuelist);
break;
}
/*
* The next link is the head. We are going to add_tail so we need to advance the pointer.
*/
- if ( &ex_req->queuelist.next == &cd->queue ){
- list_add(rq, ex_req);
+ if ( ex_req->queuelist.next == &cd->queue ){
+ list_add(&rq->queuelist, &ex_req->queuelist);
break;
}
}
} else
- list_add_tail(rq,&cd->queue)
+ list_add_tail(&rq->queuelist,&cd->queue);
}
static int clook_queue_empty(struct request_queue *q)

No commit comments for this range

Something went wrong with that request. Please try again.