On Thu, 15 Sep 2022, Ian Pilcher wrote: > Summary > ======= > > These patches add a new "blkdev" LED trigger that blinks LEDs in > response to disk (or other block device) activity. The first patch is > purely documentation, and the second patch adds the trigger. > > It operates very much like the netdev trigger. Device activity > counters are checked periodically, and LEDs are blinked if the correct > type of activity has occurred since the last check. The trigger has no > impact on the actual I/O path. > > The trigger is extremely configurable. An LED can be configured to > blink in response to any type (or combination of types) of block device > activity - reads, writes, discards, or cache flushes. The frequency > with which device activity is checked and the duration of LED blinks > can also be set. > > The trigger supports many-to-many "link" relationships between block > devices and LEDs. An LED can be linked to multiple block devices, and > a block device can be linked to multiple LEDs. To support these > many-to-many links with a sysfs API, the trigger uses write-only > attributes (link_dev_by_path and unlink_dev_by_path) to create and > remove link relationships. Existing links are shown as symbolic links > in subdirectories beneath the block device and LED sysfs directories > (/sys/class/block/<DEVICE>/linked_leds and > /sys/class/leds/<LED>/linked_devices). > > As their names indicate, link_dev_by_path and unlink_dev_by_path each > take a device special file path (e.g. /dev/sda), rather than a kernel > device name. This is required, because the block subsystem does not > provide an API to get a block device by its kernel name; only device > special file paths (or device major and minor numbers) are supported. > > (I hope that if this module is accepted, it might provide a case for > adding a "by name" API to the block subsystem. link_dev_by_name and > unlink_dev_by_name could then be added to this trigger.) > > The trigger can be built as a module or built in to the kernel. My I ask how I ended up on Cc for this set please? -- DEPRECATED: Please use lee@xxxxxxxxxx