request.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. struct request documentation
  2. Jens Axboe <axboe@suse.de> 27/05/02
  3. 1.0
  4. Index
  5. 2.0 Struct request members classification
  6. 2.1 struct request members explanation
  7. 3.0
  8. 2.0
  9. Short explanation of request members
  10. Classification flags:
  11. D driver member
  12. B block layer member
  13. I I/O scheduler member
  14. Unless an entry contains a D classification, a device driver must not access
  15. this member. Some members may contain D classifications, but should only be
  16. access through certain macros or functions (eg ->flags).
  17. <linux/blkdev.h>
  18. 2.1
  19. Member Flag Comment
  20. ------ ---- -------
  21. struct list_head queuelist BI Organization on various internal
  22. queues
  23. void *elevator_private I I/O scheduler private data
  24. unsigned char cmd[16] D Driver can use this for setting up
  25. a cdb before execution, see
  26. blk_queue_prep_rq
  27. unsigned long flags DBI Contains info about data direction,
  28. request type, etc.
  29. int rq_status D Request status bits
  30. kdev_t rq_dev DBI Target device
  31. int errors DB Error counts
  32. sector_t sector DBI Target location
  33. unsigned long hard_nr_sectors B Used to keep sector sane
  34. unsigned long nr_sectors DBI Total number of sectors in request
  35. unsigned long hard_nr_sectors B Used to keep nr_sectors sane
  36. unsigned short nr_phys_segments DB Number of physical scatter gather
  37. segments in a request
  38. unsigned short nr_hw_segments DB Number of hardware scatter gather
  39. segments in a request
  40. unsigned int current_nr_sectors DB Number of sectors in first segment
  41. of request
  42. unsigned int hard_cur_sectors B Used to keep current_nr_sectors sane
  43. int tag DB TCQ tag, if assigned
  44. void *special D Free to be used by driver
  45. char *buffer D Map of first segment, also see
  46. section on bouncing SECTION
  47. struct completion *waiting D Can be used by driver to get signalled
  48. on request completion
  49. struct bio *bio DBI First bio in request
  50. struct bio *biotail DBI Last bio in request
  51. request_queue_t *q DB Request queue this request belongs to
  52. struct request_list *rl B Request list this request came from