sysfs-class-pktcdvd 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. sysfs interface
  2. ---------------
  3. The pktcdvd module (packet writing driver) creates the following files in the
  4. sysfs: (<devid> is in the format major:minor)
  5. What: /sys/class/pktcdvd/add
  6. What: /sys/class/pktcdvd/remove
  7. What: /sys/class/pktcdvd/device_map
  8. Date: Oct. 2006
  9. KernelVersion: 2.6.20
  10. Contact: Thomas Maier <balagi@justmail.de>
  11. Description:
  12. ========== ==============================================
  13. add (WO) Write a block device id (major:minor) to
  14. create a new pktcdvd device and map it to the
  15. block device.
  16. remove (WO) Write the pktcdvd device id (major:minor)
  17. to remove the pktcdvd device.
  18. device_map (RO) Shows the device mapping in format:
  19. pktcdvd[0-7] <pktdevid> <blkdevid>
  20. ========== ==============================================
  21. What: /sys/class/pktcdvd/pktcdvd[0-7]/dev
  22. What: /sys/class/pktcdvd/pktcdvd[0-7]/uevent
  23. Date: Oct. 2006
  24. KernelVersion: 2.6.20
  25. Contact: Thomas Maier <balagi@justmail.de>
  26. Description:
  27. dev: (RO) Device id
  28. uevent: (WO) To send a uevent
  29. What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_started
  30. What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_finished
  31. What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_written
  32. What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read
  33. What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read_gather
  34. What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/reset
  35. Date: Oct. 2006
  36. KernelVersion: 2.6.20
  37. Contact: Thomas Maier <balagi@justmail.de>
  38. Description:
  39. packets_started: (RO) Number of started packets.
  40. packets_finished: (RO) Number of finished packets.
  41. kb_written: (RO) kBytes written.
  42. kb_read: (RO) kBytes read.
  43. kb_read_gather: (RO) kBytes read to fill write packets.
  44. reset: (WO) Write any value to it to reset
  45. pktcdvd device statistic values, like
  46. bytes read/written.
  47. What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/size
  48. What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_off
  49. What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_on
  50. Date: Oct. 2006
  51. KernelVersion: 2.6.20
  52. Contact: Thomas Maier <balagi@justmail.de>
  53. Description:
  54. ============== ================================================
  55. size (RO) Contains the size of the bio write queue.
  56. congestion_off (RW) If bio write queue size is below this mark,
  57. accept new bio requests from the block layer.
  58. congestion_on (RW) If bio write queue size is higher as this
  59. mark, do no longer accept bio write requests
  60. from the block layer and wait till the pktcdvd
  61. device has processed enough bio's so that bio
  62. write queue size is below congestion off mark.
  63. A value of <= 0 disables congestion control.
  64. ============== ================================================
  65. Example:
  66. --------
  67. To use the pktcdvd sysfs interface directly, you can do::
  68. # create a new pktcdvd device mapped to /dev/hdc
  69. echo "22:0" >/sys/class/pktcdvd/add
  70. cat /sys/class/pktcdvd/device_map
  71. # assuming device pktcdvd0 was created, look at stat's
  72. cat /sys/class/pktcdvd/pktcdvd0/stat/kb_written
  73. # print the device id of the mapped block device
  74. fgrep pktcdvd0 /sys/class/pktcdvd/device_map
  75. # remove device, using pktcdvd0 device id 253:0
  76. echo "253:0" >/sys/class/pktcdvd/remove