From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9FE1C4338F for ; Mon, 9 Aug 2021 22:43:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 83B6B60BD3 for ; Mon, 9 Aug 2021 22:43:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234638AbhHIWoD (ORCPT ); Mon, 9 Aug 2021 18:44:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:47846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbhHIWoC (ORCPT ); Mon, 9 Aug 2021 18:44:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C053F60F8F; Mon, 9 Aug 2021 22:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628549021; bh=/kit/4kBgb+oc/UK+zBg9kJTOAB/mp3ogaP/yVFr32Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BinE8AMs4Dr3kN/51LsD2TgouGZP/JLP1K14sspnCv5WT8NVf2KfeCysCJA3Sjam/ smpp88csaLggnTb1hK5xAjTU202B+tPv6cTin2/pbKi9OOsOrMRReqCOzVAnxGGd84 js5BuF4ZFZd/RTQG6bLrznYkgMACxWjV0oJsJ/aprSZVVRnBrBZIBP9+BR4RGONGlh AFoiSXqYZbleWCwi53ngsKrdGdAWnJGmse4sV37p0KoKf2zJS/+5IX5nP0Wacx10jb jduqkdvXWaSRosK1W+8awAItT8VzXzXfmR8E2HC22nrtpjyja+NNu9t77LBJulxgiF 0fSZ/3oupYYTQ== Date: Tue, 10 Aug 2021 00:43:31 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Ian Pilcher Cc: pali@kernel.org, linux-block@vger.kernel.org, linux-leds@vger.kernel.org, axboe@kernel.dk, pavel@ucw.cz, linux-kernel@vger.kernel.org, kernelnewbies@kernelnewbies.org Subject: Re: [RFC PATCH v2 00/10] Add configurable block device LED triggers Message-ID: <20210810004331.0f0094a5@thinkpad> In-Reply-To: <81c128a1-c1b8-0f1e-a77b-6704bade26c0@gmail.com> References: <20210809033217.1113444-1-arequipeno@gmail.com> <20210809205633.4300bbea@thinkpad> <81c128a1-c1b8-0f1e-a77b-6704bade26c0@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org On Mon, 9 Aug 2021 14:54:26 -0500 Ian Pilcher wrote: > I'm not unalterably opposed to the idea, but I don't currently see a way > to do that without resolving block devices (struct gendisk) by name, and > that seems to be a no-no. So a name like "sda1" is not viable? Why? What about "MAJOR:MINOR"? I confess that I am not very familiar with internal blkdev API. Quick look reveals that there is a struct block_device, containing a member bd_disk, which is a pointer to struct gendisk. What is the relationship between these two? Can there be a block device without a gendisk, for example? Marek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 278AFC4338F for ; Mon, 9 Aug 2021 22:45:28 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7C5860F8F for ; Mon, 9 Aug 2021 22:45:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A7C5860F8F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mDE1O-0003dz-IX for kernelnewbies@archiver.kernel.org; Mon, 09 Aug 2021 18:45:26 -0400 Received: from mail.kernel.org ([198.145.29.99]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mDDzj-0001aX-6P for kernelnewbies@kernelnewbies.org; Mon, 09 Aug 2021 18:43:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C053F60F8F; Mon, 9 Aug 2021 22:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628549021; bh=/kit/4kBgb+oc/UK+zBg9kJTOAB/mp3ogaP/yVFr32Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BinE8AMs4Dr3kN/51LsD2TgouGZP/JLP1K14sspnCv5WT8NVf2KfeCysCJA3Sjam/ smpp88csaLggnTb1hK5xAjTU202B+tPv6cTin2/pbKi9OOsOrMRReqCOzVAnxGGd84 js5BuF4ZFZd/RTQG6bLrznYkgMACxWjV0oJsJ/aprSZVVRnBrBZIBP9+BR4RGONGlh AFoiSXqYZbleWCwi53ngsKrdGdAWnJGmse4sV37p0KoKf2zJS/+5IX5nP0Wacx10jb jduqkdvXWaSRosK1W+8awAItT8VzXzXfmR8E2HC22nrtpjyja+NNu9t77LBJulxgiF 0fSZ/3oupYYTQ== Date: Tue, 10 Aug 2021 00:43:31 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Ian Pilcher Subject: Re: [RFC PATCH v2 00/10] Add configurable block device LED triggers Message-ID: <20210810004331.0f0094a5@thinkpad> In-Reply-To: <81c128a1-c1b8-0f1e-a77b-6704bade26c0@gmail.com> References: <20210809033217.1113444-1-arequipeno@gmail.com> <20210809205633.4300bbea@thinkpad> <81c128a1-c1b8-0f1e-a77b-6704bade26c0@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Cc: axboe@kernel.dk, kernelnewbies@kernelnewbies.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, pavel@ucw.cz, pali@kernel.org, linux-leds@vger.kernel.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces+kernelnewbies=archiver.kernel.org@kernelnewbies.org On Mon, 9 Aug 2021 14:54:26 -0500 Ian Pilcher wrote: > I'm not unalterably opposed to the idea, but I don't currently see a way > to do that without resolving block devices (struct gendisk) by name, and > that seems to be a no-no. So a name like "sda1" is not viable? Why? What about "MAJOR:MINOR"? I confess that I am not very familiar with internal blkdev API. Quick look reveals that there is a struct block_device, containing a member bd_disk, which is a pointer to struct gendisk. What is the relationship between these two? Can there be a block device without a gendisk, for example? Marek _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies