o So far noop, deadline and AS had one common structure called *_data which contained both the queue information where requests are queued and also common data used for scheduling. This patch breaks down this common structure in two parts, *_queue and *_data. This is along the lines of cfq where all the reuquests are queued in queue and common data and tunables are part of data.

o It does not change the functionality but this re-organization helps once noop, deadline and AS are changed to use hierarchical fair queuing.

o looks like queue_empty function is not required and we can check for q->nr_sorted in elevator layer to see if ioscheduler queues are empty or not.

@@ -299,48 +313,62 @@ dispatch_find_request: /* * we are not running a batch, find best request for selected data_dir */- if (deadline_check_fifo(dd, data_dir) || !dd->next_rq[data_dir]) {+ if (deadline_check_fifo(dq, data_dir) || !dq->next_rq[data_dir]) { /* * A deadline has expired, the last request was in the other * direction, or we have run out of higher-sectored requests. * Start again from the request with the earliest expiry time. */- rq = rq_entry_fifo(dd->fifo_list[data_dir].next);+ rq = rq_entry_fifo(dq->fifo_list[data_dir].next); } else { /* * The last req was the same dir and we have a next request in * sort order. No expired requests so continue on from here. */- rq = dd->next_rq[data_dir];+ rq = dq->next_rq[data_dir]; }