diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 17:29:53 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 17:29:53 -0400 |
| commit | bfffa1cc9db8a950dd4b1a09999f8a20e69a6652 (patch) | |
| tree | 01b046072ca9105b7852f790762f7b00b72e6ff7 /include/linux | |
| parent | cc8a0a943948d1b1bc803b37486831af7b04dd38 (diff) | |
| parent | ae994ea972473c0ace9d55f718b60f0727af1381 (diff) | |
Merge branch 'for-4.2/core' of git://git.kernel.dk/linux-block
Pull core block IO update from Jens Axboe:
"Nothing really major in here, mostly a collection of smaller
optimizations and cleanups, mixed with various fixes. In more detail,
this contains:
- Addition of policy specific data to blkcg for block cgroups. From
Arianna Avanzini.
- Various cleanups around command types from Christoph.
- Cleanup of the suspend block I/O path from Christoph.
- Plugging updates from Shaohua and Jeff Moyer, for blk-mq.
- Eliminating atomic inc/dec of both remaining IO count and reference
count in a bio. From me.
- Fixes for SG gap and chunk size support for data-less (discards)
IO, so we can merge these better. From me.
- Small restructuring of blk-mq shared tag support, freeing drivers
from iterating hardware queues. From Keith Busch.
- A few cfq-iosched tweaks, from Tahsin Erdogan and me. Makes the
IOPS mode the default for non-rotational storage"
* 'for-4.2/core' of git://git.kernel.dk/linux-block: (35 commits)
cfq-iosched: fix other locations where blkcg_to_cfqgd() can return NULL
cfq-iosched: fix sysfs oops when attempting to read unconfigured weights
cfq-iosched: move group scheduling functions under ifdef
cfq-iosched: fix the setting of IOPS mode on SSDs
blktrace: Add blktrace.c to BLOCK LAYER in MAINTAINERS file
block, cgroup: implement policy-specific per-blkcg data
block: Make CFQ default to IOPS mode on SSDs
block: add blk_set_queue_dying() to blkdev.h
blk-mq: Shared tag enhancements
block: don't honor chunk sizes for data-less IO
block: only honor SG gap prevention for merges that contain data
block: fix returnvar.cocci warnings
block, dm: don't copy bios for request clones
block: remove management of bi_remaining when restoring original bi_end_io
block: replace trylock with mutex_lock in blkdev_reread_part()
block: export blkdev_reread_part() and __blkdev_reread_part()
suspend: simplify block I/O handling
block: collapse bio bit space
block: remove unused BIO_RW_BLOCK and BIO_EOF flags
block: remove BIO_EOPNOTSUPP
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bio.h | 17 | ||||
| -rw-r--r-- | include/linux/blk-mq.h | 4 | ||||
| -rw-r--r-- | include/linux/blk_types.h | 25 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 45 | ||||
| -rw-r--r-- | include/linux/elevator.h | 2 | ||||
| -rw-r--r-- | include/linux/fs.h | 3 | ||||
| -rw-r--r-- | include/linux/ide.h | 27 | ||||
| -rw-r--r-- | include/linux/swap.h | 1 |
8 files changed, 71 insertions, 53 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index da3a127c9958..f0291cf64cc5 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
| @@ -290,7 +290,21 @@ static inline unsigned bio_segments(struct bio *bio) | |||
| 290 | * returns. and then bio would be freed memory when if (bio->bi_flags ...) | 290 | * returns. and then bio would be freed memory when if (bio->bi_flags ...) |
| 291 | * runs | 291 | * runs |
| 292 | */ | 292 | */ |
| 293 | #define bio_get(bio) atomic_inc(&(bio)->bi_cnt) | 293 | static inline void bio_get(struct bio *bio) |
| 294 | { | ||
| 295 | bio->bi_flags |= (1 << BIO_REFFED); | ||
| 296 | smp_mb__before_atomic(); | ||
| 297 | atomic_inc(&bio->__bi_cnt); | ||
| 298 | } | ||
| 299 | |||
| 300 | static inline void bio_cnt_set(struct bio *bio, unsigned int count) | ||
| 301 | { | ||
| 302 | if (count != 1) { | ||
| 303 | bio->bi_flags |= (1 << BIO_REFFED); | ||
| 304 | smp_mb__before_atomic(); | ||
| 305 | } | ||
| 306 | atomic_set(&bio->__bi_cnt, count); | ||
| 307 | } | ||
| 294 | 308 | ||
| 295 | enum bip_flags { | 309 | enum bip_flags { |
| 296 | BIP_BLOCK_INTEGRITY = 1 << 0, /* block layer owns integrity data */ | 310 | BIP_BLOCK_INTEGRITY = 1 << 0, /* block layer owns integrity data */ |
| @@ -413,7 +427,6 @@ static inline struct bio *bio_clone_kmalloc(struct bio *bio, gfp_t gfp_mask) | |||
| 413 | } | 427 | } |
| 414 | 428 | ||
| 415 | extern void bio_endio(struct bio *, int); | 429 | extern void bio_endio(struct bio *, int); |
| 416 | extern void bio_endio_nodec(struct bio *, int); | ||
| 417 | struct request_queue; | 430 | struct request_queue; |
| 418 | extern int bio_phys_segments(struct request_queue *, struct bio *); | 431 | extern int bio_phys_segments(struct request_queue *, struct bio *); |
| 419 | 432 | ||
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 2056a99b92f8..37d1602c4f7a 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h | |||
| @@ -96,6 +96,7 @@ typedef void (exit_request_fn)(void *, struct request *, unsigned int, | |||
| 96 | 96 | ||
| 97 | typedef void (busy_iter_fn)(struct blk_mq_hw_ctx *, struct request *, void *, | 97 | typedef void (busy_iter_fn)(struct blk_mq_hw_ctx *, struct request *, void *, |
| 98 | bool); | 98 | bool); |
| 99 | typedef void (busy_tag_iter_fn)(struct request *, void *, bool); | ||
| 99 | 100 | ||
| 100 | struct blk_mq_ops { | 101 | struct blk_mq_ops { |
| 101 | /* | 102 | /* |
| @@ -182,6 +183,7 @@ bool blk_mq_can_queue(struct blk_mq_hw_ctx *); | |||
| 182 | struct request *blk_mq_alloc_request(struct request_queue *q, int rw, | 183 | struct request *blk_mq_alloc_request(struct request_queue *q, int rw, |
| 183 | gfp_t gfp, bool reserved); | 184 | gfp_t gfp, bool reserved); |
| 184 | struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag); | 185 | struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag); |
| 186 | struct cpumask *blk_mq_tags_cpumask(struct blk_mq_tags *tags); | ||
| 185 | 187 | ||
| 186 | enum { | 188 | enum { |
| 187 | BLK_MQ_UNIQUE_TAG_BITS = 16, | 189 | BLK_MQ_UNIQUE_TAG_BITS = 16, |
| @@ -224,6 +226,8 @@ void blk_mq_run_hw_queues(struct request_queue *q, bool async); | |||
| 224 | void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); | 226 | void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs); |
| 225 | void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn, | 227 | void blk_mq_tag_busy_iter(struct blk_mq_hw_ctx *hctx, busy_iter_fn *fn, |
| 226 | void *priv); | 228 | void *priv); |
| 229 | void blk_mq_all_tag_busy_iter(struct blk_mq_tags *tags, busy_tag_iter_fn *fn, | ||
| 230 | void *priv); | ||
| 227 | void blk_mq_freeze_queue(struct request_queue *q); | 231 | void blk_mq_freeze_queue(struct request_queue *q); |
| 228 | void blk_mq_unfreeze_queue(struct request_queue *q); | 232 | void blk_mq_unfreeze_queue(struct request_queue *q); |
| 229 | void blk_mq_freeze_queue_start(struct request_queue *q); | 233 | void blk_mq_freeze_queue_start(struct request_queue *q); |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index b7299febc4b4..6ab9d12d1f17 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
| @@ -65,7 +65,7 @@ struct bio { | |||
| 65 | unsigned int bi_seg_front_size; | 65 | unsigned int bi_seg_front_size; |
| 66 | unsigned int bi_seg_back_size; | 66 | unsigned int bi_seg_back_size; |
| 67 | 67 | ||
| 68 | atomic_t bi_remaining; | 68 | atomic_t __bi_remaining; |
| 69 | 69 | ||
| 70 | bio_end_io_t *bi_end_io; | 70 | bio_end_io_t *bi_end_io; |
| 71 | 71 | ||
| @@ -92,7 +92,7 @@ struct bio { | |||
| 92 | 92 | ||
| 93 | unsigned short bi_max_vecs; /* max bvl_vecs we can hold */ | 93 | unsigned short bi_max_vecs; /* max bvl_vecs we can hold */ |
| 94 | 94 | ||
| 95 | atomic_t bi_cnt; /* pin count */ | 95 | atomic_t __bi_cnt; /* pin count */ |
| 96 | 96 | ||
| 97 | struct bio_vec *bi_io_vec; /* the actual vec list */ | 97 | struct bio_vec *bi_io_vec; /* the actual vec list */ |
| 98 | 98 | ||
| @@ -112,16 +112,15 @@ struct bio { | |||
| 112 | * bio flags | 112 | * bio flags |
| 113 | */ | 113 | */ |
| 114 | #define BIO_UPTODATE 0 /* ok after I/O completion */ | 114 | #define BIO_UPTODATE 0 /* ok after I/O completion */ |
| 115 | #define BIO_RW_BLOCK 1 /* RW_AHEAD set, and read/write would block */ | 115 | #define BIO_SEG_VALID 1 /* bi_phys_segments valid */ |
| 116 | #define BIO_EOF 2 /* out-out-bounds error */ | 116 | #define BIO_CLONED 2 /* doesn't own data */ |
| 117 | #define BIO_SEG_VALID 3 /* bi_phys_segments valid */ | 117 | #define BIO_BOUNCED 3 /* bio is a bounce bio */ |
| 118 | #define BIO_CLONED 4 /* doesn't own data */ | 118 | #define BIO_USER_MAPPED 4 /* contains user pages */ |
| 119 | #define BIO_BOUNCED 5 /* bio is a bounce bio */ | 119 | #define BIO_NULL_MAPPED 5 /* contains invalid user pages */ |
| 120 | #define BIO_USER_MAPPED 6 /* contains user pages */ | 120 | #define BIO_QUIET 6 /* Make BIO Quiet */ |
| 121 | #define BIO_EOPNOTSUPP 7 /* not supported */ | 121 | #define BIO_SNAP_STABLE 7 /* bio data must be snapshotted during write */ |
| 122 | #define BIO_NULL_MAPPED 8 /* contains invalid user pages */ | 122 | #define BIO_CHAIN 8 /* chained bio, ->bi_remaining in effect */ |
| 123 | #define BIO_QUIET 9 /* Make BIO Quiet */ | 123 | #define BIO_REFFED 9 /* bio has elevated ->bi_cnt */ |
| 124 | #define BIO_SNAP_STABLE 10 /* bio data must be snapshotted during write */ | ||
| 125 | 124 | ||
| 126 | /* | 125 | /* |
| 127 | * Flags starting here get preserved by bio_reset() - this includes | 126 | * Flags starting here get preserved by bio_reset() - this includes |
| @@ -193,6 +192,7 @@ enum rq_flag_bits { | |||
| 193 | __REQ_HASHED, /* on IO scheduler merge hash */ | 192 | __REQ_HASHED, /* on IO scheduler merge hash */ |
| 194 | __REQ_MQ_INFLIGHT, /* track inflight for MQ */ | 193 | __REQ_MQ_INFLIGHT, /* track inflight for MQ */ |
| 195 | __REQ_NO_TIMEOUT, /* requests may never expire */ | 194 | __REQ_NO_TIMEOUT, /* requests may never expire */ |
| 195 | __REQ_CLONE, /* cloned bios */ | ||
| 196 | __REQ_NR_BITS, /* stops here */ | 196 | __REQ_NR_BITS, /* stops here */ |
| 197 | }; | 197 | }; |
| 198 | 198 | ||
| @@ -247,5 +247,6 @@ enum rq_flag_bits { | |||
| 247 | #define REQ_HASHED (1ULL << __REQ_HASHED) | 247 | #define REQ_HASHED (1ULL << __REQ_HASHED) |
| 248 | #define REQ_MQ_INFLIGHT (1ULL << __REQ_MQ_INFLIGHT) | 248 | #define REQ_MQ_INFLIGHT (1ULL << __REQ_MQ_INFLIGHT) |
| 249 | #define REQ_NO_TIMEOUT (1ULL << __REQ_NO_TIMEOUT) | 249 | #define REQ_NO_TIMEOUT (1ULL << __REQ_NO_TIMEOUT) |
| 250 | #define REQ_CLONE (1ULL << __REQ_CLONE) | ||
| 250 | 251 | ||
| 251 | #endif /* __LINUX_BLK_TYPES_H */ | 252 | #endif /* __LINUX_BLK_TYPES_H */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 5d93a6645e88..a6ae5f9bee49 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -30,7 +30,6 @@ struct scsi_ioctl_command; | |||
| 30 | 30 | ||
| 31 | struct request_queue; | 31 | struct request_queue; |
| 32 | struct elevator_queue; | 32 | struct elevator_queue; |
| 33 | struct request_pm_state; | ||
| 34 | struct blk_trace; | 33 | struct blk_trace; |
| 35 | struct request; | 34 | struct request; |
| 36 | struct sg_io_hdr; | 35 | struct sg_io_hdr; |
| @@ -75,18 +74,7 @@ struct request_list { | |||
| 75 | enum rq_cmd_type_bits { | 74 | enum rq_cmd_type_bits { |
| 76 | REQ_TYPE_FS = 1, /* fs request */ | 75 | REQ_TYPE_FS = 1, /* fs request */ |
| 77 | REQ_TYPE_BLOCK_PC, /* scsi command */ | 76 | REQ_TYPE_BLOCK_PC, /* scsi command */ |
| 78 | REQ_TYPE_SENSE, /* sense request */ | 77 | REQ_TYPE_DRV_PRIV, /* driver defined types from here */ |
| 79 | REQ_TYPE_PM_SUSPEND, /* suspend request */ | ||
| 80 | REQ_TYPE_PM_RESUME, /* resume request */ | ||
| 81 | REQ_TYPE_PM_SHUTDOWN, /* shutdown request */ | ||
| 82 | REQ_TYPE_SPECIAL, /* driver defined type */ | ||
| 83 | /* | ||
| 84 | * for ATA/ATAPI devices. this really doesn't belong here, ide should | ||
| 85 | * use REQ_TYPE_SPECIAL and use rq->cmd[0] with the range of driver | ||
| 86 | * private REQ_LB opcodes to differentiate what type of request this is | ||
| 87 | */ | ||
| 88 | REQ_TYPE_ATA_TASKFILE, | ||
| 89 | REQ_TYPE_ATA_PC, | ||
| 90 | }; | 78 | }; |
| 91 | 79 | ||
| 92 | #define BLK_MAX_CDB 16 | 80 | #define BLK_MAX_CDB 16 |
| @@ -108,7 +96,7 @@ struct request { | |||
| 108 | struct blk_mq_ctx *mq_ctx; | 96 | struct blk_mq_ctx *mq_ctx; |
| 109 | 97 | ||
| 110 | u64 cmd_flags; | 98 | u64 cmd_flags; |
| 111 | enum rq_cmd_type_bits cmd_type; | 99 | unsigned cmd_type; |
| 112 | unsigned long atomic_flags; | 100 | unsigned long atomic_flags; |
| 113 | 101 | ||
| 114 | int cpu; | 102 | int cpu; |
| @@ -216,19 +204,6 @@ static inline unsigned short req_get_ioprio(struct request *req) | |||
| 216 | return req->ioprio; | 204 | return req->ioprio; |
| 217 | } | 205 | } |
| 218 | 206 | ||
| 219 | /* | ||
| 220 | * State information carried for REQ_TYPE_PM_SUSPEND and REQ_TYPE_PM_RESUME | ||
| 221 | * requests. Some step values could eventually be made generic. | ||
| 222 | */ | ||
| 223 | struct request_pm_state | ||
| 224 | { | ||
| 225 | /* PM state machine step value, currently driver specific */ | ||
| 226 | int pm_step; | ||
| 227 | /* requested PM state value (S1, S2, S3, S4, ...) */ | ||
| 228 | u32 pm_state; | ||
| 229 | void* data; /* for driver use */ | ||
| 230 | }; | ||
| 231 | |||
| 232 | #include <linux/elevator.h> | 207 | #include <linux/elevator.h> |
| 233 | 208 | ||
| 234 | struct blk_queue_ctx; | 209 | struct blk_queue_ctx; |
| @@ -469,7 +444,7 @@ struct request_queue { | |||
| 469 | struct mutex sysfs_lock; | 444 | struct mutex sysfs_lock; |
| 470 | 445 | ||
| 471 | int bypass_depth; | 446 | int bypass_depth; |
| 472 | int mq_freeze_depth; | 447 | atomic_t mq_freeze_depth; |
| 473 | 448 | ||
| 474 | #if defined(CONFIG_BLK_DEV_BSG) | 449 | #if defined(CONFIG_BLK_DEV_BSG) |
| 475 | bsg_job_fn *bsg_job_fn; | 450 | bsg_job_fn *bsg_job_fn; |
| @@ -610,10 +585,6 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) | |||
| 610 | (((rq)->cmd_flags & REQ_STARTED) && \ | 585 | (((rq)->cmd_flags & REQ_STARTED) && \ |
| 611 | ((rq)->cmd_type == REQ_TYPE_FS)) | 586 | ((rq)->cmd_type == REQ_TYPE_FS)) |
| 612 | 587 | ||
| 613 | #define blk_pm_request(rq) \ | ||
| 614 | ((rq)->cmd_type == REQ_TYPE_PM_SUSPEND || \ | ||
| 615 | (rq)->cmd_type == REQ_TYPE_PM_RESUME) | ||
| 616 | |||
| 617 | #define blk_rq_cpu_valid(rq) ((rq)->cpu != -1) | 588 | #define blk_rq_cpu_valid(rq) ((rq)->cpu != -1) |
| 618 | #define blk_bidi_rq(rq) ((rq)->next_rq != NULL) | 589 | #define blk_bidi_rq(rq) ((rq)->next_rq != NULL) |
| 619 | /* rq->queuelist of dequeued request must be list_empty() */ | 590 | /* rq->queuelist of dequeued request must be list_empty() */ |
| @@ -804,11 +775,7 @@ extern void blk_add_request_payload(struct request *rq, struct page *page, | |||
| 804 | unsigned int len); | 775 | unsigned int len); |
| 805 | extern int blk_rq_check_limits(struct request_queue *q, struct request *rq); | 776 | extern int blk_rq_check_limits(struct request_queue *q, struct request *rq); |
| 806 | extern int blk_lld_busy(struct request_queue *q); | 777 | extern int blk_lld_busy(struct request_queue *q); |
| 807 | extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, | 778 | extern void blk_rq_prep_clone(struct request *rq, struct request *rq_src); |
| 808 | struct bio_set *bs, gfp_t gfp_mask, | ||
| 809 | int (*bio_ctr)(struct bio *, struct bio *, void *), | ||
| 810 | void *data); | ||
| 811 | extern void blk_rq_unprep_clone(struct request *rq); | ||
| 812 | extern int blk_insert_cloned_request(struct request_queue *q, | 779 | extern int blk_insert_cloned_request(struct request_queue *q, |
| 813 | struct request *rq); | 780 | struct request *rq); |
| 814 | extern void blk_delay_queue(struct request_queue *, unsigned long); | 781 | extern void blk_delay_queue(struct request_queue *, unsigned long); |
| @@ -845,6 +812,7 @@ extern void blk_stop_queue(struct request_queue *q); | |||
| 845 | extern void blk_sync_queue(struct request_queue *q); | 812 | extern void blk_sync_queue(struct request_queue *q); |
| 846 | extern void __blk_stop_queue(struct request_queue *q); | 813 | extern void __blk_stop_queue(struct request_queue *q); |
| 847 | extern void __blk_run_queue(struct request_queue *q); | 814 | extern void __blk_run_queue(struct request_queue *q); |
| 815 | extern void __blk_run_queue_uncond(struct request_queue *q); | ||
| 848 | extern void blk_run_queue(struct request_queue *); | 816 | extern void blk_run_queue(struct request_queue *); |
| 849 | extern void blk_run_queue_async(struct request_queue *q); | 817 | extern void blk_run_queue_async(struct request_queue *q); |
| 850 | extern int blk_rq_map_user(struct request_queue *, struct request *, | 818 | extern int blk_rq_map_user(struct request_queue *, struct request *, |
| @@ -933,7 +901,7 @@ static inline unsigned int blk_rq_get_max_sectors(struct request *rq) | |||
| 933 | if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC)) | 901 | if (unlikely(rq->cmd_type == REQ_TYPE_BLOCK_PC)) |
| 934 | return q->limits.max_hw_sectors; | 902 | return q->limits.max_hw_sectors; |
| 935 | 903 | ||
| 936 | if (!q->limits.chunk_sectors) | 904 | if (!q->limits.chunk_sectors || (rq->cmd_flags & REQ_DISCARD)) |
| 937 | return blk_queue_get_max_sectors(q, rq->cmd_flags); | 905 | return blk_queue_get_max_sectors(q, rq->cmd_flags); |
| 938 | 906 | ||
| 939 | return min(blk_max_size_offset(q, blk_rq_pos(rq)), | 907 | return min(blk_max_size_offset(q, blk_rq_pos(rq)), |
| @@ -1054,6 +1022,7 @@ bool __must_check blk_get_queue(struct request_queue *); | |||
| 1054 | struct request_queue *blk_alloc_queue(gfp_t); | 1022 | struct request_queue *blk_alloc_queue(gfp_t); |
| 1055 | struct request_queue *blk_alloc_queue_node(gfp_t, int); | 1023 | struct request_queue *blk_alloc_queue_node(gfp_t, int); |
| 1056 | extern void blk_put_queue(struct request_queue *); | 1024 | extern void blk_put_queue(struct request_queue *); |
| 1025 | extern void blk_set_queue_dying(struct request_queue *); | ||
| 1057 | 1026 | ||
| 1058 | /* | 1027 | /* |
| 1059 | * block layer runtime pm functions | 1028 | * block layer runtime pm functions |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 45a91474487d..638b324f0291 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -39,6 +39,7 @@ typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct reques | |||
| 39 | typedef int (elevator_init_fn) (struct request_queue *, | 39 | typedef int (elevator_init_fn) (struct request_queue *, |
| 40 | struct elevator_type *e); | 40 | struct elevator_type *e); |
| 41 | typedef void (elevator_exit_fn) (struct elevator_queue *); | 41 | typedef void (elevator_exit_fn) (struct elevator_queue *); |
| 42 | typedef void (elevator_registered_fn) (struct request_queue *); | ||
| 42 | 43 | ||
| 43 | struct elevator_ops | 44 | struct elevator_ops |
| 44 | { | 45 | { |
| @@ -68,6 +69,7 @@ struct elevator_ops | |||
| 68 | 69 | ||
| 69 | elevator_init_fn *elevator_init_fn; | 70 | elevator_init_fn *elevator_init_fn; |
| 70 | elevator_exit_fn *elevator_exit_fn; | 71 | elevator_exit_fn *elevator_exit_fn; |
| 72 | elevator_registered_fn *elevator_registered_fn; | ||
| 71 | }; | 73 | }; |
| 72 | 74 | ||
| 73 | #define ELV_NAME_MAX (16) | 75 | #define ELV_NAME_MAX (16) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b577e801b4af..5db7b1379d17 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -2280,6 +2280,9 @@ extern struct block_device *blkdev_get_by_path(const char *path, fmode_t mode, | |||
| 2280 | extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, | 2280 | extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, |
| 2281 | void *holder); | 2281 | void *holder); |
| 2282 | extern void blkdev_put(struct block_device *bdev, fmode_t mode); | 2282 | extern void blkdev_put(struct block_device *bdev, fmode_t mode); |
| 2283 | extern int __blkdev_reread_part(struct block_device *bdev); | ||
| 2284 | extern int blkdev_reread_part(struct block_device *bdev); | ||
| 2285 | |||
| 2283 | #ifdef CONFIG_SYSFS | 2286 | #ifdef CONFIG_SYSFS |
| 2284 | extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); | 2287 | extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); |
| 2285 | extern void bd_unlink_disk_holder(struct block_device *bdev, | 2288 | extern void bd_unlink_disk_holder(struct block_device *bdev, |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 93b5ca754b5b..a633898f36ac 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -39,6 +39,19 @@ | |||
| 39 | 39 | ||
| 40 | struct device; | 40 | struct device; |
| 41 | 41 | ||
| 42 | /* IDE-specific values for req->cmd_type */ | ||
| 43 | enum ata_cmd_type_bits { | ||
| 44 | REQ_TYPE_ATA_TASKFILE = REQ_TYPE_DRV_PRIV + 1, | ||
| 45 | REQ_TYPE_ATA_PC, | ||
| 46 | REQ_TYPE_ATA_SENSE, /* sense request */ | ||
| 47 | REQ_TYPE_ATA_PM_SUSPEND,/* suspend request */ | ||
| 48 | REQ_TYPE_ATA_PM_RESUME, /* resume request */ | ||
| 49 | }; | ||
| 50 | |||
| 51 | #define ata_pm_request(rq) \ | ||
| 52 | ((rq)->cmd_type == REQ_TYPE_ATA_PM_SUSPEND || \ | ||
| 53 | (rq)->cmd_type == REQ_TYPE_ATA_PM_RESUME) | ||
| 54 | |||
| 42 | /* Error codes returned in rq->errors to the higher part of the driver. */ | 55 | /* Error codes returned in rq->errors to the higher part of the driver. */ |
| 43 | enum { | 56 | enum { |
| 44 | IDE_DRV_ERROR_GENERAL = 101, | 57 | IDE_DRV_ERROR_GENERAL = 101, |
| @@ -1314,6 +1327,19 @@ struct ide_port_info { | |||
| 1314 | u8 udma_mask; | 1327 | u8 udma_mask; |
| 1315 | }; | 1328 | }; |
| 1316 | 1329 | ||
| 1330 | /* | ||
| 1331 | * State information carried for REQ_TYPE_ATA_PM_SUSPEND and REQ_TYPE_ATA_PM_RESUME | ||
| 1332 | * requests. | ||
| 1333 | */ | ||
| 1334 | struct ide_pm_state { | ||
| 1335 | /* PM state machine step value, currently driver specific */ | ||
| 1336 | int pm_step; | ||
| 1337 | /* requested PM state value (S1, S2, S3, S4, ...) */ | ||
| 1338 | u32 pm_state; | ||
| 1339 | void* data; /* for driver use */ | ||
| 1340 | }; | ||
| 1341 | |||
| 1342 | |||
| 1317 | int ide_pci_init_one(struct pci_dev *, const struct ide_port_info *, void *); | 1343 | int ide_pci_init_one(struct pci_dev *, const struct ide_port_info *, void *); |
| 1318 | int ide_pci_init_two(struct pci_dev *, struct pci_dev *, | 1344 | int ide_pci_init_two(struct pci_dev *, struct pci_dev *, |
| 1319 | const struct ide_port_info *, void *); | 1345 | const struct ide_port_info *, void *); |
| @@ -1551,4 +1577,5 @@ static inline void ide_set_drivedata(ide_drive_t *drive, void *data) | |||
| 1551 | #define ide_host_for_each_port(i, port, host) \ | 1577 | #define ide_host_for_each_port(i, port, host) \ |
| 1552 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) | 1578 | for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) |
| 1553 | 1579 | ||
| 1580 | |||
| 1554 | #endif /* _IDE_H */ | 1581 | #endif /* _IDE_H */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index cee108cbe2d5..38874729dc5f 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -377,7 +377,6 @@ extern void end_swap_bio_write(struct bio *bio, int err); | |||
| 377 | extern int __swap_writepage(struct page *page, struct writeback_control *wbc, | 377 | extern int __swap_writepage(struct page *page, struct writeback_control *wbc, |
| 378 | void (*end_write_func)(struct bio *, int)); | 378 | void (*end_write_func)(struct bio *, int)); |
| 379 | extern int swap_set_page_dirty(struct page *page); | 379 | extern int swap_set_page_dirty(struct page *page); |
| 380 | extern void end_swap_bio_read(struct bio *bio, int err); | ||
| 381 | 380 | ||
| 382 | int add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, | 381 | int add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, |
| 383 | unsigned long nr_pages, sector_t start_block); | 382 | unsigned long nr_pages, sector_t start_block); |
