blob: 754e104ed3699452f36f636bd234d425f87dbad7 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2struct request documentation
3
Rob Landley26bbb292007-10-15 11:42:52 +02004Jens Axboe <jens.axboe@oracle.com> 27/05/02
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
61.0
7Index
8
92.0 Struct request members classification
10
11 2.1 struct request members explanation
12
133.0
14
15
162.0
17Short explanation of request members
18
19Classification flags:
20
21 D driver member
22 B block layer member
23 I I/O scheduler member
24
25Unless an entry contains a D classification, a device driver must not access
26this member. Some members may contain D classifications, but should only be
27access through certain macros or functions (eg ->flags).
28
29<linux/blkdev.h>
30
312.1
32Member Flag Comment
33------ ---- -------
34
35struct list_head queuelist BI Organization on various internal
36 queues
37
38void *elevator_private I I/O scheduler private data
39
40unsigned char cmd[16] D Driver can use this for setting up
41 a cdb before execution, see
42 blk_queue_prep_rq
43
44unsigned long flags DBI Contains info about data direction,
45 request type, etc.
46
47int rq_status D Request status bits
48
49kdev_t rq_dev DBI Target device
50
51int errors DB Error counts
52
53sector_t sector DBI Target location
54
55unsigned long hard_nr_sectors B Used to keep sector sane
56
57unsigned long nr_sectors DBI Total number of sectors in request
58
59unsigned long hard_nr_sectors B Used to keep nr_sectors sane
60
61unsigned short nr_phys_segments DB Number of physical scatter gather
62 segments in a request
63
64unsigned short nr_hw_segments DB Number of hardware scatter gather
65 segments in a request
66
67unsigned int current_nr_sectors DB Number of sectors in first segment
68 of request
69
70unsigned int hard_cur_sectors B Used to keep current_nr_sectors sane
71
72int tag DB TCQ tag, if assigned
73
74void *special D Free to be used by driver
75
76char *buffer D Map of first segment, also see
77 section on bouncing SECTION
78
79struct completion *waiting D Can be used by driver to get signalled
80 on request completion
81
82struct bio *bio DBI First bio in request
83
84struct bio *biotail DBI Last bio in request
85
Jens Axboe165125e2007-07-24 09:28:11 +020086struct request_queue *q DB Request queue this request belongs to
Linus Torvalds1da177e2005-04-16 15:20:36 -070087
88struct request_list *rl B Request list this request came from