cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

request.rst (2562B)


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