elevator.c (b4d8d1a93c6ea042b29bb66fbb1cf6bc556c18f7) elevator.c (2056a782f8e7e65fd4bfd027506b4ce1c5e9ccd4)
1/*
2 * Block device elevator/IO-scheduler.
3 *
4 * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
5 *
6 * 30042000 Jens Axboe <axboe@suse.de> :
7 *
8 * Split the elevator a bit so that it is possible to choose a different

--- 19 unchanged lines hidden (view full) ---

28#include <linux/elevator.h>
29#include <linux/bio.h>
30#include <linux/config.h>
31#include <linux/module.h>
32#include <linux/slab.h>
33#include <linux/init.h>
34#include <linux/compiler.h>
35#include <linux/delay.h>
1/*
2 * Block device elevator/IO-scheduler.
3 *
4 * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
5 *
6 * 30042000 Jens Axboe <axboe@suse.de> :
7 *
8 * Split the elevator a bit so that it is possible to choose a different

--- 19 unchanged lines hidden (view full) ---

28#include <linux/elevator.h>
29#include <linux/bio.h>
30#include <linux/config.h>
31#include <linux/module.h>
32#include <linux/slab.h>
33#include <linux/init.h>
34#include <linux/compiler.h>
35#include <linux/delay.h>
36#include <linux/blktrace_api.h>
36
37#include <asm/uaccess.h>
38
39static DEFINE_SPINLOCK(elv_list_lock);
40static LIST_HEAD(elv_list);
41
42/*
43 * can we safely merge with this request?

--- 284 unchanged lines hidden (view full) ---

328 }
329}
330
331void elv_insert(request_queue_t *q, struct request *rq, int where)
332{
333 struct list_head *pos;
334 unsigned ordseq;
335
37
38#include <asm/uaccess.h>
39
40static DEFINE_SPINLOCK(elv_list_lock);
41static LIST_HEAD(elv_list);
42
43/*
44 * can we safely merge with this request?

--- 284 unchanged lines hidden (view full) ---

329 }
330}
331
332void elv_insert(request_queue_t *q, struct request *rq, int where)
333{
334 struct list_head *pos;
335 unsigned ordseq;
336
337 blk_add_trace_rq(q, rq, BLK_TA_INSERT);
338
336 rq->q = q;
337
338 switch (where) {
339 case ELEVATOR_INSERT_FRONT:
340 rq->flags |= REQ_SOFTBARRIER;
341
342 list_add(&rq->queuelist, &q->queue_head);
343 break;

--- 150 unchanged lines hidden (view full) ---

494 e->ops->elevator_activate_req_fn(q, rq);
495
496 /*
497 * just mark as started even if we don't start
498 * it, a request that has been delayed should
499 * not be passed by new incoming requests
500 */
501 rq->flags |= REQ_STARTED;
339 rq->q = q;
340
341 switch (where) {
342 case ELEVATOR_INSERT_FRONT:
343 rq->flags |= REQ_SOFTBARRIER;
344
345 list_add(&rq->queuelist, &q->queue_head);
346 break;

--- 150 unchanged lines hidden (view full) ---

497 e->ops->elevator_activate_req_fn(q, rq);
498
499 /*
500 * just mark as started even if we don't start
501 * it, a request that has been delayed should
502 * not be passed by new incoming requests
503 */
504 rq->flags |= REQ_STARTED;
505 blk_add_trace_rq(q, rq, BLK_TA_ISSUE);
502 }
503
504 if (!q->boundary_rq || q->boundary_rq == rq) {
505 q->end_sector = rq_end_sector(rq);
506 q->boundary_rq = NULL;
507 }
508
509 if ((rq->flags & REQ_DONTPREP) || !q->prep_rq_fn)

--- 392 unchanged lines hidden ---
506 }
507
508 if (!q->boundary_rq || q->boundary_rq == rq) {
509 q->end_sector = rq_end_sector(rq);
510 q->boundary_rq = NULL;
511 }
512
513 if ((rq->flags & REQ_DONTPREP) || !q->prep_rq_fn)

--- 392 unchanged lines hidden ---