Pull more block updates from Jens Axboe: "A combination of changes that ended up depending on both the driver and core branch (and/or the IDE removal), and a few late arriving fixes. In detail: - Fix io ticks wrap-around issue (Chunguang) - nvme-tcp sock locking fix (Maurizio) - s390-dasd fixes (Kees, Christoph) - blk_execute_rq polling support (Keith) - blk-cgroup RCU iteration fix (Yu) - nbd backend ID addition (Prasanna) - Partition deletion fix (Yufen) - Use blk_mq_alloc_disk for mmc, mtip32xx, ubd (Christoph) - Removal of now dead block request types due to IDE removal (Christoph) - Loop probing and control device cleanups (Christoph) - Device uevent fix (Christoph) - Misc cleanups/fixes (Tetsuo, Christoph)" * tag 'block-5.14-2021-07-08' of git://git.kernel.dk/linux-block: (34 commits) blk-cgroup: prevent rcu_sched detected stalls warnings while iterating blkgs block: fix the problem of io_ticks becoming smaller nvme-tcp: can't set sk_user_data without write_lock loop: remove unused variable in loop_set_status() block: remove the bdgrab in blk_drop_partitions block: grab a device refcount in disk_uevent s390/dasd: Avoid field over-reading memcpy() dasd: unexport dasd_set_target_state block: check disk exist before trying to add partition ubd: remove dead code in ubd_setup_common nvme: use return value from blk_execute_rq() block: return errors from blk_execute_rq() nvme: use blk_execute_rq() for passthrough commands block: support polling through blk_execute_rq block: remove REQ_OP_SCSI_{IN,OUT} block: mark blk_mq_init_queue_data static loop: rewrite loop_exit using idr_for_each_entry loop: split loop_lookup loop: don't allow deleting an unspecified loop device loop: move loop_ctl_mutex locking into loop_add ...
Showing the changes to include/linux/blkdev.h (1 of 43 files). Show all
Unified · Split
| @@ -240,42 +240,15 @@ struct request { · 239 unmodified lines | ||
| 240 | 240 | void *end_io_data; |
| 241 | 241 | }; |
| 242 | 242 | |
| 243 | −static inline bool blk_op_is_scsi(unsigned int op) | |
| 244 | −{ | |
| 245 | − return op == REQ_OP_SCSI_IN || op == REQ_OP_SCSI_OUT; | |
| 246 | −} | |
| 247 | − | |
| 248 | −static inline bool blk_op_is_private(unsigned int op) | |
| 243 | +static inline bool blk_op_is_passthrough(unsigned int op) | |
| 249 | 244 | { |
| 245 | + op &= REQ_OP_MASK; | |
| 250 | 246 | return op == REQ_OP_DRV_IN || op == REQ_OP_DRV_OUT; |
| 251 | 247 | } |
| 252 | 248 | |
| 253 | −static inline bool blk_rq_is_scsi(struct request *rq) | |
| 254 | −{ | |
| 255 | − return blk_op_is_scsi(req_op(rq)); | |
| 256 | −} | |
| 257 | − | |
| 258 | −static inline bool blk_rq_is_private(struct request *rq) | |
| 259 | −{ | |
| 260 | − return blk_op_is_private(req_op(rq)); | |
| 261 | −} | |
| 262 | − | |
| 263 | 249 | static inline bool blk_rq_is_passthrough(struct request *rq) |
| 264 | 250 | { |
| 265 | − return blk_rq_is_scsi(rq) || blk_rq_is_private(rq); | |
| 266 | −} | |
| 267 | − | |
| 268 | −static inline bool bio_is_passthrough(struct bio *bio) | |
| 269 | −{ | |
| 270 | − unsigned op = bio_op(bio); | |
| 271 | − | |
| 272 | − return blk_op_is_scsi(op) || blk_op_is_private(op); | |
| 273 | −} | |
| 274 | − | |
| 275 | −static inline bool blk_op_is_passthrough(unsigned int op) | |
| 276 | −{ | |
| 277 | − return (blk_op_is_scsi(op & REQ_OP_MASK) || | |
| 278 | − blk_op_is_private(op & REQ_OP_MASK)); | |
| 251 | + return blk_op_is_passthrough(req_op(rq)); | |
| 279 | 252 | } |
| 280 | 253 | |
| 281 | 254 | static inline unsigned short req_get_ioprio(struct request *req) |
| @@ -936,10 +909,12 @@ extern int blk_rq_map_kern(struct request_queue *, struct request *, void *, uns · 654 unmodified lines | ||
| 936 | 909 | extern int blk_rq_map_user_iov(struct request_queue *, struct request *, |
| 937 | 910 | struct rq_map_data *, const struct iov_iter *, |
| 938 | 911 | gfp_t); |
| 939 | −extern void blk_execute_rq(struct gendisk *, struct request *, int); | |
| 940 | 912 | extern void blk_execute_rq_nowait(struct gendisk *, |
| 941 | 913 | struct request *, int, rq_end_io_fn *); |
| 942 | 914 | |
| 915 | +blk_status_t blk_execute_rq(struct gendisk *bd_disk, struct request *rq, | |
| 916 | + int at_head); | |
| 917 | + | |
| 943 | 918 | /* Helper to convert REQ_OP_XXX to its string format XXX */ |
| 944 | 919 | extern const char *blk_op_str(unsigned int op); |
| 945 | 920 | |