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 <fsteiner-mail1@xxxxxxxxxxxxxx> > Cc: Jacek Anaszewski <jacek.anaszewski@xxxxxxxxx> > Cc: Pavel Machek <pavel@xxxxxx> > Cc: Dan Murphy <dmurphy@xxxxxx> > Cc: Jens Axboe <axboe@xxxxxxxxx> > Cc: "James E.J. Bottomley" <jejb@xxxxxxxxxxxxx> > Cc: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx> > Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> > --- > 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 [...]