History

block: add a rq_list type

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.

Christoph Hellwig committed 2 years ago

Commit a3396b91 parent e8225ab11 files · +104 −88Browse files

Showing the changes to include/linux/blkdev.h (1 of 11 files). Show all

Unified · Split

include/linux/blkdev.h+8−3
@@ -1007,6 +1007,11 @@ extern void blk_put_queue(struct request_queue *); · 1006 unmodified lines
10071007 void blk_mark_disk_dead(struct gendisk *disk);
10081008
10091009 #ifdef CONFIG_BLOCK
1010+struct rq_list {
1011+ struct request *head;
1012+ struct request *tail;
1013+};
1014+
10101015 /*
10111016 * blk_plug permits building a queue of related requests by holding the I/O
10121017 * 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
10191024 * blk_flush_plug() is called.
10201025 */
10211026 struct blk_plug {
1022− struct request *mq_list; /* blk-mq requests */
1027+ struct rq_list mq_list; /* blk-mq requests */
10231028
10241029 /* if ios_left is > 1, we can batch tag/rq allocations */
1025− struct request *cached_rq;
1030+ struct rq_list cached_rqs;
10261031 u64 cur_ktime;
10271032 unsigned short nr_ios;
10281033
@@ -1684,7 +1689,7 @@ int bdev_thaw(struct block_device *bdev); · 655 unmodified lines
16841689 void bdev_fput(struct file *bdev_file);
16851690
16861691 struct io_comp_batch {
1687− struct request *req_list;
1692+ struct rq_list req_list;
16881693 bool need_ts;
16891694 void (*complete)(struct io_comp_batch *);
16901695 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t