Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Ian,

On Wed, 28 Jul 2021 20:53:37 -0500
Ian Pilcher <arequipeno@xxxxxxxxx> wrote:

> * Document the sysfs attributes (/sys/class/block/led_trigger_*
>   and /sys/class/block/${DEV}/led_trigger) that can be used to
>   create, list, and delete block device LED triggers and to
>   set and clear device/trigger associations.
> 
> * Pull API documentation from block/blk-ledtrig.c (once it
>   exists).
> 
> Signed-off-by: Ian Pilcher <arequipeno@xxxxxxxxx>

thank you for this proposal.

I don't really see the purpose for having multiple different block
device LED triggers. Moreover we really do not want userspace to be
able to add LED triggers with arbitrary names, and as many as the
userspace wants. There is no sense in making userspace be able to
create 10000 triggers. Also if userspace can create triggers with
arbitrary names, it could "steal" a name for a real trigger. For
example if netdev trigger is compiled as a module, and before loading
someone creates blockdev trigger with name "netdev", the loading of
netdev trigger will fail.

I would like the blkdev trigger to work in a similar way the netdev
trigger works:
- only one trigger, with name "blkdev"
- when activated on a LED, new sysfs files will be created:
  * device_name, where user can write sda1, vdb, ...
  * read (binary value, 1 means blink on read)
  * write (binary value, 1 means blink on write)
  * interval (blink interval)
  Note that device_name could allow multiple names, in theory...
  Also some other disk states may be included, like error, or something
- also the blinking itself can be done as is done netdev trigger: every
  50ms the work function would look at blkdev stats, and if current
  stat (number of bytes read/written) is different from previous, then
  blink the LED

Marek
  



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux