diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bio.h | 8 | ||||
| -rw-r--r-- | include/linux/blk_types.h | 11 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 40 | ||||
| -rw-r--r-- | include/linux/elevator.h | 6 | ||||
| -rw-r--r-- | include/linux/loop.h | 1 |
5 files changed, 27 insertions, 39 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index ce33e6868a2f..a3c071c9e189 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -269,14 +269,6 @@ extern void bvec_free_bs(struct bio_set *, struct bio_vec *, unsigned int); | |||
| 269 | extern unsigned int bvec_nr_vecs(unsigned short idx); | 269 | extern unsigned int bvec_nr_vecs(unsigned short idx); |
| 270 | 270 | ||
| 271 | /* | 271 | /* |
| 272 | * Allow queuer to specify a completion CPU for this bio | ||
| 273 | */ | ||
| 274 | static inline void bio_set_completion_cpu(struct bio *bio, unsigned int cpu) | ||
| 275 | { | ||
| 276 | bio->bi_comp_cpu = cpu; | ||
| 277 | } | ||
| 278 | |||
| 279 | /* | ||
| 280 | * bio_set is used to allow other portions of the IO system to | 272 | * bio_set is used to allow other portions of the IO system to |
| 281 | * allocate their own private memory pools for bio and iovec structures. | 273 | * allocate their own private memory pools for bio and iovec structures. |
| 282 | * These memory pools in turn all allocate from the bio_slab | 274 | * These memory pools in turn all allocate from the bio_slab |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 71fc53bb8f1c..4053cbd4490e 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
| @@ -59,8 +59,6 @@ struct bio { | |||
| 59 | 59 | ||
| 60 | unsigned int bi_max_vecs; /* max bvl_vecs we can hold */ | 60 | unsigned int bi_max_vecs; /* max bvl_vecs we can hold */ |
| 61 | 61 | ||
| 62 | unsigned int bi_comp_cpu; /* completion CPU */ | ||
| 63 | |||
| 64 | atomic_t bi_cnt; /* pin count */ | 62 | atomic_t bi_cnt; /* pin count */ |
| 65 | 63 | ||
| 66 | struct bio_vec *bi_io_vec; /* the actual vec list */ | 64 | struct bio_vec *bi_io_vec; /* the actual vec list */ |
| @@ -93,11 +91,10 @@ struct bio { | |||
| 93 | #define BIO_BOUNCED 5 /* bio is a bounce bio */ | 91 | #define BIO_BOUNCED 5 /* bio is a bounce bio */ |
| 94 | #define BIO_USER_MAPPED 6 /* contains user pages */ | 92 | #define BIO_USER_MAPPED 6 /* contains user pages */ |
| 95 | #define BIO_EOPNOTSUPP 7 /* not supported */ | 93 | #define BIO_EOPNOTSUPP 7 /* not supported */ |
| 96 | #define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */ | 94 | #define BIO_NULL_MAPPED 8 /* contains invalid user pages */ |
| 97 | #define BIO_NULL_MAPPED 9 /* contains invalid user pages */ | 95 | #define BIO_FS_INTEGRITY 9 /* fs owns integrity data, not block layer */ |
| 98 | #define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */ | 96 | #define BIO_QUIET 10 /* Make BIO Quiet */ |
| 99 | #define BIO_QUIET 11 /* Make BIO Quiet */ | 97 | #define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */ |
| 100 | #define BIO_MAPPED_INTEGRITY 12/* integrity metadata has been remapped */ | ||
| 101 | #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) | 98 | #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) |
| 102 | 99 | ||
| 103 | /* | 100 | /* |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 7fbaa9103344..5267cd2f20dc 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -195,7 +195,7 @@ struct request_pm_state | |||
| 195 | #include <linux/elevator.h> | 195 | #include <linux/elevator.h> |
| 196 | 196 | ||
| 197 | typedef void (request_fn_proc) (struct request_queue *q); | 197 | typedef void (request_fn_proc) (struct request_queue *q); |
| 198 | typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); | 198 | typedef void (make_request_fn) (struct request_queue *q, struct bio *bio); |
| 199 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); | 199 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); |
| 200 | typedef void (unprep_rq_fn) (struct request_queue *, struct request *); | 200 | typedef void (unprep_rq_fn) (struct request_queue *, struct request *); |
| 201 | 201 | ||
| @@ -680,6 +680,8 @@ extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, | |||
| 680 | extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, | 680 | extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, |
| 681 | struct scsi_ioctl_command __user *); | 681 | struct scsi_ioctl_command __user *); |
| 682 | 682 | ||
| 683 | extern void blk_queue_bio(struct request_queue *q, struct bio *bio); | ||
| 684 | |||
| 683 | /* | 685 | /* |
| 684 | * A queue has just exitted congestion. Note this in the global counter of | 686 | * A queue has just exitted congestion. Note this in the global counter of |
| 685 | * congested queues, and wake up anyone who was waiting for requests to be | 687 | * congested queues, and wake up anyone who was waiting for requests to be |
| @@ -863,16 +865,22 @@ struct request_queue *blk_alloc_queue_node(gfp_t, int); | |||
| 863 | extern void blk_put_queue(struct request_queue *); | 865 | extern void blk_put_queue(struct request_queue *); |
| 864 | 866 | ||
| 865 | /* | 867 | /* |
| 866 | * Note: Code in between changing the blk_plug list/cb_list or element of such | 868 | * blk_plug permits building a queue of related requests by holding the I/O |
| 867 | * lists is preemptable, but such code can't do sleep (or be very careful), | 869 | * fragments for a short period. This allows merging of sequential requests |
| 868 | * otherwise data is corrupted. For details, please check schedule() where | 870 | * into single larger request. As the requests are moved from a per-task list to |
| 869 | * blk_schedule_flush_plug() is called. | 871 | * the device's request_queue in a batch, this results in improved scalability |
| 872 | * as the lock contention for request_queue lock is reduced. | ||
| 873 | * | ||
| 874 | * It is ok not to disable preemption when adding the request to the plug list | ||
| 875 | * or when attempting a merge, because blk_schedule_flush_list() will only flush | ||
| 876 | * the plug list when the task sleeps by itself. For details, please see | ||
| 877 | * schedule() where blk_schedule_flush_plug() is called. | ||
| 870 | */ | 878 | */ |
| 871 | struct blk_plug { | 879 | struct blk_plug { |
| 872 | unsigned long magic; | 880 | unsigned long magic; /* detect uninitialized use-cases */ |
| 873 | struct list_head list; | 881 | struct list_head list; /* requests */ |
| 874 | struct list_head cb_list; | 882 | struct list_head cb_list; /* md requires an unplug callback */ |
| 875 | unsigned int should_sort; | 883 | unsigned int should_sort; /* list to be sorted before flushing? */ |
| 876 | }; | 884 | }; |
| 877 | #define BLK_MAX_REQUEST_COUNT 16 | 885 | #define BLK_MAX_REQUEST_COUNT 16 |
| 878 | 886 | ||
| @@ -1189,20 +1197,6 @@ static inline uint64_t rq_io_start_time_ns(struct request *req) | |||
| 1189 | } | 1197 | } |
| 1190 | #endif | 1198 | #endif |
| 1191 | 1199 | ||
| 1192 | #ifdef CONFIG_BLK_DEV_THROTTLING | ||
| 1193 | extern int blk_throtl_init(struct request_queue *q); | ||
| 1194 | extern void blk_throtl_exit(struct request_queue *q); | ||
| 1195 | extern int blk_throtl_bio(struct request_queue *q, struct bio **bio); | ||
| 1196 | #else /* CONFIG_BLK_DEV_THROTTLING */ | ||
| 1197 | static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio) | ||
| 1198 | { | ||
| 1199 | return 0; | ||
| 1200 | } | ||
| 1201 | |||
| 1202 | static inline int blk_throtl_init(struct request_queue *q) { return 0; } | ||
| 1203 | static inline int blk_throtl_exit(struct request_queue *q) { return 0; } | ||
| 1204 | #endif /* CONFIG_BLK_DEV_THROTTLING */ | ||
| 1205 | |||
| 1206 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ | 1200 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ |
| 1207 | MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) | 1201 | MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) |
| 1208 | #define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \ | 1202 | #define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \ |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index d800d5142184..1d0f7a2ff73b 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -38,6 +38,12 @@ struct elevator_ops | |||
| 38 | elevator_merged_fn *elevator_merged_fn; | 38 | elevator_merged_fn *elevator_merged_fn; |
| 39 | elevator_merge_req_fn *elevator_merge_req_fn; | 39 | elevator_merge_req_fn *elevator_merge_req_fn; |
| 40 | elevator_allow_merge_fn *elevator_allow_merge_fn; | 40 | elevator_allow_merge_fn *elevator_allow_merge_fn; |
| 41 | |||
| 42 | /* | ||
| 43 | * Used for both plugged list and elevator merging and in the | ||
| 44 | * former case called without queue_lock. Read comment on top of | ||
| 45 | * attempt_plug_merge() for details. | ||
| 46 | */ | ||
| 41 | elevator_bio_merged_fn *elevator_bio_merged_fn; | 47 | elevator_bio_merged_fn *elevator_bio_merged_fn; |
| 42 | 48 | ||
| 43 | elevator_dispatch_fn *elevator_dispatch_fn; | 49 | elevator_dispatch_fn *elevator_dispatch_fn; |
diff --git a/include/linux/loop.h b/include/linux/loop.h index 683d69890119..a06880689115 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
| @@ -73,7 +73,6 @@ struct loop_device { | |||
| 73 | */ | 73 | */ |
| 74 | enum { | 74 | enum { |
| 75 | LO_FLAGS_READ_ONLY = 1, | 75 | LO_FLAGS_READ_ONLY = 1, |
| 76 | LO_FLAGS_USE_AOPS = 2, | ||
| 77 | LO_FLAGS_AUTOCLEAR = 4, | 76 | LO_FLAGS_AUTOCLEAR = 4, |
| 78 | }; | 77 | }; |
| 79 | 78 | ||
