Hi Akinobu, Thank you for the v2. I've checked and it works as expected.
One thing is missing though - ABI documentation. Please add Documentation/ABI/testing/sysfs-class-led-trigger-blk and document read, write and discard files. Best regards, Jacek Anaszewski On 7/22/19 4:59 PM, Akinobu Mita wrote: > This allows LEDs to be controlled by block device activity. > > We already have ledtrig-disk (LED disk activity trigger), but the lower > level disk drivers need to utilize ledtrig_disk_activity() to make the > LED blink. > > The LED block device trigger doesn't require the lower level drivers to > have any instrumentation. The activity is collected by polling the disk > stats. > > Example: > > echo block-nvme0n1 > /sys/class/leds/diy/trigger > > Cc: Frank Steiner <[email protected]> > Cc: Jacek Anaszewski <[email protected]> > Cc: Pavel Machek <[email protected]> > Cc: Dan Murphy <[email protected]> > Cc: Jens Axboe <[email protected]> > Cc: "James E.J. Bottomley" <[email protected]> > Cc: "Martin K. Petersen" <[email protected]> > Signed-off-by: Akinobu Mita <[email protected]> > --- > block/genhd.c | 2 + > drivers/leds/trigger/Kconfig | 7 ++ > drivers/leds/trigger/Makefile | 1 + > drivers/leds/trigger/ledtrig-blk.c | 225 > +++++++++++++++++++++++++++++++++++++ > include/linux/genhd.h | 3 + > include/linux/leds.h | 27 +++++ > 6 files changed, 265 insertions(+) > create mode 100644 drivers/leds/trigger/ledtrig-blk.c [...]
