request.rst 2.5 KB

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