0001 ============================
0002 struct request documentation
0003 ============================
0004
0005 Jens Axboe <jens.axboe@oracle.com> 27/05/02
0006
0007
0008 .. FIXME:
0009 No idea about what does mean - seems just some noise, so comment it
0010
0011 1.0
0012 Index
0013
0014 2.0 Struct request members classification
0015
0016 2.1 struct request members explanation
0017
0018 3.0
0019
0020
0021 2.0
0022
0023
0024
0025 Short explanation of request members
0026 ====================================
0027
0028 Classification flags:
0029
0030 = ====================
0031 D driver member
0032 B block layer member
0033 I I/O scheduler member
0034 = ====================
0035
0036 Unless an entry contains a D classification, a device driver must not access
0037 this member. Some members may contain D classifications, but should only be
0038 access through certain macros or functions (eg ->flags).
0039
0040 <linux/blkdev.h>
0041
0042 =============================== ======= =======================================
0043 Member Flag Comment
0044 =============================== ======= =======================================
0045 struct list_head queuelist BI Organization on various internal
0046 queues
0047
0048 ``void *elevator_private`` I I/O scheduler private data
0049
0050 unsigned char cmd[16] D Driver can use this for setting up
0051 a cdb before execution, see
0052 blk_queue_prep_rq
0053
0054 unsigned long flags DBI Contains info about data direction,
0055 request type, etc.
0056
0057 int rq_status D Request status bits
0058
0059 kdev_t rq_dev DBI Target device
0060
0061 int errors DB Error counts
0062
0063 sector_t sector DBI Target location
0064
0065 unsigned long hard_nr_sectors B Used to keep sector sane
0066
0067 unsigned long nr_sectors DBI Total number of sectors in request
0068
0069 unsigned long hard_nr_sectors B Used to keep nr_sectors sane
0070
0071 unsigned short nr_phys_segments DB Number of physical scatter gather
0072 segments in a request
0073
0074 unsigned short nr_hw_segments DB Number of hardware scatter gather
0075 segments in a request
0076
0077 unsigned int current_nr_sectors DB Number of sectors in first segment
0078 of request
0079
0080 unsigned int hard_cur_sectors B Used to keep current_nr_sectors sane
0081
0082 int tag DB TCQ tag, if assigned
0083
0084 ``void *special`` D Free to be used by driver
0085
0086 ``char *buffer`` D Map of first segment, also see
0087 section on bouncing SECTION
0088
0089 ``struct completion *waiting`` D Can be used by driver to get signalled
0090 on request completion
0091
0092 ``struct bio *bio`` DBI First bio in request
0093
0094 ``struct bio *biotail`` DBI Last bio in request
0095
0096 ``struct request_queue *q`` DB Request queue this request belongs to
0097
0098 ``struct request_list *rl`` B Request list this request came from
0099 =============================== ======= =======================================