3 The pktcdvd module (packet writing driver) creates the following files in the
4 sysfs: (<devid> is in the format major:minor)
6 What: /sys/class/pktcdvd/add
7 What: /sys/class/pktcdvd/remove
8 What: /sys/class/pktcdvd/device_map
11 Contact: Thomas Maier <balagi@justmail.de>
14 add: (WO) Write a block device id (major:minor) to
15 create a new pktcdvd device and map it to the
18 remove: (WO) Write the pktcdvd device id (major:minor)
19 to remove the pktcdvd device.
21 device_map: (RO) Shows the device mapping in format:
22 pktcdvd[0-7] <pktdevid> <blkdevid>
25 What: /sys/class/pktcdvd/pktcdvd[0-7]/dev
26 What: /sys/class/pktcdvd/pktcdvd[0-7]/uevent
29 Contact: Thomas Maier <balagi@justmail.de>
33 uevent: (WO) To send a uevent
36 What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_started
37 What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_finished
38 What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_written
39 What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read
40 What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read_gather
41 What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/reset
44 Contact: Thomas Maier <balagi@justmail.de>
46 packets_started: (RO) Number of started packets.
48 packets_finished: (RO) Number of finished packets.
50 kb_written: (RO) kBytes written.
52 kb_read: (RO) kBytes read.
54 kb_read_gather: (RO) kBytes read to fill write packets.
56 reset: (WO) Write any value to it to reset
57 pktcdvd device statistic values, like
61 What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/size
62 What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_off
63 What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_on
66 Contact: Thomas Maier <balagi@justmail.de>
68 size: (RO) Contains the size of the bio write queue.
70 congestion_off: (RW) If bio write queue size is below this mark,
71 accept new bio requests from the block layer.
73 congestion_on: (RW) If bio write queue size is higher as this
74 mark, do no longer accept bio write requests
75 from the block layer and wait till the pktcdvd
76 device has processed enough bio's so that bio
77 write queue size is below congestion off mark.
78 A value of <= 0 disables congestion control.
83 To use the pktcdvd sysfs interface directly, you can do:
85 # create a new pktcdvd device mapped to /dev/hdc
86 echo "22:0" >/sys/class/pktcdvd/add
87 cat /sys/class/pktcdvd/device_map
88 # assuming device pktcdvd0 was created, look at stat's
89 cat /sys/class/pktcdvd/pktcdvd0/stat/kb_written
90 # print the device id of the mapped block device
91 fgrep pktcdvd0 /sys/class/pktcdvd/device_map
92 # remove device, using pktcdvd0 device id 253:0
93 echo "253:0" >/sys/class/pktcdvd/remove