Replace the semi-open coded request list helpers with a proper rq_list type that mirrors the bio_list and has head and tail pointers. Besides better type safety this actually allows to insert at the tail of the list, which will be useful soon.
Showing the changes to include/linux/blkdev.h (1 of 11 files). Show all
Unified · Split
| @@ -1007,6 +1007,11 @@ extern void blk_put_queue(struct request_queue *); · 1006 unmodified lines | ||
| 1007 | 1007 | void blk_mark_disk_dead(struct gendisk *disk); |
| 1008 | 1008 | |
| 1009 | 1009 | #ifdef CONFIG_BLOCK |
| 1010 | +struct rq_list { | |
| 1011 | + struct request *head; | |
| 1012 | + struct request *tail; | |
| 1013 | +}; | |
| 1014 | + | |
| 1010 | 1015 | /* |
| 1011 | 1016 | * blk_plug permits building a queue of related requests by holding the I/O |
| 1012 | 1017 | * fragments for a short period. This allows merging of sequential requests |
| @@ -1019,10 +1024,10 @@ void blk_mark_disk_dead(struct gendisk *disk); · 6 unmodified lines | ||
| 1019 | 1024 | * blk_flush_plug() is called. |
| 1020 | 1025 | */ |
| 1021 | 1026 | struct blk_plug { |
| 1022 | − struct request *mq_list; /* blk-mq requests */ | |
| 1027 | + struct rq_list mq_list; /* blk-mq requests */ | |
| 1023 | 1028 | |
| 1024 | 1029 | /* if ios_left is > 1, we can batch tag/rq allocations */ |
| 1025 | − struct request *cached_rq; | |
| 1030 | + struct rq_list cached_rqs; | |
| 1026 | 1031 | u64 cur_ktime; |
| 1027 | 1032 | unsigned short nr_ios; |
| 1028 | 1033 | |
| @@ -1684,7 +1689,7 @@ int bdev_thaw(struct block_device *bdev); · 655 unmodified lines | ||
| 1684 | 1689 | void bdev_fput(struct file *bdev_file); |
| 1685 | 1690 | |
| 1686 | 1691 | struct io_comp_batch { |
| 1687 | − struct request *req_list; | |
| 1692 | + struct rq_list req_list; | |
| 1688 | 1693 | bool need_ts; |
| 1689 | 1694 | void (*complete)(struct io_comp_batch *); |
| 1690 | 1695 | }; |