Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2886186pxy; Mon, 3 May 2021 10:10:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUkL6APfjBj+sjqLsBaluRoaRrRdcqMOGSpBMPKx2cshj773wAvblHbp84Yv01hf70HrmJ X-Received: by 2002:aa7:800a:0:b029:250:c8c5:64b3 with SMTP id j10-20020aa7800a0000b0290250c8c564b3mr19289212pfi.23.1620061813516; Mon, 03 May 2021 10:10:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620061813; cv=none; d=google.com; s=arc-20160816; b=DbVst08kWEvaGCP2eU5OKJykRbyxU0NL6rweUguaIp92csVCZ/1eyJysoyPUfVXPWz GUz+bvod/JtGsbCxQEx9RRL3VwWu+DPVh1Pf43bu7o7eU9b3Dt4hVIzmmx3fte5xO7N9 jw8A1NV3hiZZSVqloCmZ0Cn6PxvlCfz4aQcr6JrG+LI3FiZzi42DbRkbVJTqVdbH38TK QAzNaN1+RHcLC5dW9YTCAOVhbmuoEOF8xJCqkkXHecc040D1NACXnQ0mehydYxzBxWZK h6J8Vi1/s0Ziif0/9hBA79R7nSIs/myt4e/thCK/aDahInQU3sMmP1UwSD9TFhEGDSQG RLOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=RrJUS6NLVWMLCD2nvRHa8o/nd+iFjJJRBA017wbYz4Y=; b=O3e0xcK/tFAdzyzGJPX4/R6/zquVVoHV0ltU2sgLPnGRazENfCJ7HzlHyeuaqpe1v4 j0f/b4ukHdedfOLkV8zP90o44Kb+X50DMe8ovjh3yZl2Ouxl3wRjoV1uG9C741YsX8Y2 hjSqA4vLiPNzFRAl7YXOgT2BFQTasXiHk5JxzO6PmNqddIpFxR8tE/AgGOriQ6Y8JdNH 2qtsx7tPt7n8AHiCCyMkH+pzux+t52DRau3c04zYci3Y8VEP2nT9YFN1dQ3pKXgQh4ss WAm76xzD0fXYeoMFLLEs9ZZn5DekZRz1eDz5bzB7egv3u4BcbsQl/s751hm0ZDME+GQl TTvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si17253691pfv.33.2021.05.03.10.10.01; Mon, 03 May 2021 10:10:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233630AbhECRII (ORCPT + 99 others); Mon, 3 May 2021 13:08:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:44850 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234000AbhECQ5O (ORCPT ); Mon, 3 May 2021 12:57:14 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A80B6AF0F; Mon, 3 May 2021 16:56:18 +0000 (UTC) Date: Mon, 3 May 2021 13:56:15 -0300 From: Enzo Matsumiya To: Pavel Machek Cc: Hannes Reinecke , linux-leds@vger.kernel.org, linux-block@vger.kernel.org, u.kleine-koenig@pengutronix.de, Jens Axboe , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/2] leds: trigger: implement block trigger Message-ID: <20210503165615.maqgm5e2gq554hcm@hyori> References: <20210430183216.27458-1-ematsumiya@suse.de> <20210430183216.27458-3-ematsumiya@suse.de> <7e8da9ec-b3e3-0329-d54c-bb44c4064f0d@suse.de> <20210503101134.GB6621@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210503101134.GB6621@amd> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/03, Pavel Machek wrote: >> As already commented on, this for_each_blk() construct is not a good idea. >> Infact, I guess it would be better if you could invert the logic: >> Not having the block trigger enumerating all devices, but rather let the >> devices register with the block trigger. >> That would have the benefit that one could choose which block device should >> be handled by the LED trigger subsystem, _and_ you would avoid the need for >> a for_each_blk() construct. >> Thing is, I don't think that all block devices should be handled by the LED >> trigger; eg for things like 'loop' or 'ramdisk' it is very >> >questionable. > >> Downside is that you would need to modify the drivers, but realistically >> there are only very few drivers which should be modified; I would go for >> nvme-pci and the sd driver for starters. Maybe floppy, but arguably that can >> omitted as one has a very good audio indicator for floppy accesses >> :-) > >And we already have disk activity trigger. Maybe NVMe and SD needs to >be modified to use it? > >Best regards, > Pavel TBH I haven't thought of that. My initial idea was to actually offer maximum flexibility to the user, so exposing all block devices on the system [*], being able to set any LED available as an indicator for each of those. But, indeed, just using ledtrig-disk in NVMe and SD might just be simpler. [*] - again, I see now this was a bad idea and will be changed in a possible next version