X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fblkdev.h;h=59e1259b1c408ad22a68b25b4b0a2e1580513747;hb=4e8f10b7ccf1c3c53a818a157962074a7340732e;hp=56bb6a4e15f3b2afe80bb4dee0026f6fc1518852;hpb=2e6e33bab6e1996a5dec9108fb467b52b841e7a8;p=linux-2.6 diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 56bb6a4e15..59e1259b1c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -17,11 +17,14 @@ #include +struct scsi_ioctl_command; + struct request_queue; typedef struct request_queue request_queue_t; struct elevator_queue; typedef struct elevator_queue elevator_t; struct request_pm_state; +struct blk_trace; #define BLKDEV_MIN_RQ 4 #define BLKDEV_MAX_RQ 128 /* Default maximum */ @@ -54,25 +57,29 @@ struct as_io_context { struct cfq_queue; struct cfq_io_context { - /* - * circular list of cfq_io_contexts belonging to a process io context - */ - struct list_head list; - struct cfq_queue *cfqq[2]; + struct rb_node rb_node; void *key; + struct cfq_queue *cfqq[2]; + struct io_context *ioc; unsigned long last_end_request; - unsigned long last_queue; + sector_t last_request_pos; + unsigned long last_queue; + unsigned long ttime_total; unsigned long ttime_samples; unsigned long ttime_mean; + unsigned int seek_samples; + u64 seek_total; + sector_t seek_mean; + struct list_head queue_list; - void (*dtor)(struct cfq_io_context *); - void (*exit)(struct cfq_io_context *); + void (*dtor)(struct io_context *); /* destructor */ + void (*exit)(struct io_context *); /* called on task exit */ }; /* @@ -93,7 +100,7 @@ struct io_context { int nr_batch_requests; /* Number of requests left in the batch */ struct as_io_context *aic; - struct cfq_io_context *cic; + struct rb_root cic_root; }; void put_io_context(struct io_context *ioc); @@ -416,6 +423,8 @@ struct request_queue unsigned int sg_reserved_size; int node; + struct blk_trace *blk_trace; + /* * reserved for flush operations */ @@ -604,6 +613,8 @@ extern void blk_plug_device(request_queue_t *); extern int blk_remove_plug(request_queue_t *); extern void blk_recount_segments(request_queue_t *, struct bio *); extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *); +extern int sg_scsi_ioctl(struct file *, struct request_queue *, + struct gendisk *, struct scsi_ioctl_command __user *); extern void blk_start_queue(request_queue_t *q); extern void blk_stop_queue(request_queue_t *q); extern void blk_sync_queue(struct request_queue *q);