Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1542096pxb; Fri, 10 Sep 2021 08:10:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJym1Ew2m/IUUJXDnJ85Ait4+AMpCibl8W6gZ+Z85euZy798iDIgx3wEd3cJ1KUCukqiM1Io X-Received: by 2002:a92:c888:: with SMTP id w8mr1827466ilo.188.1631286629818; Fri, 10 Sep 2021 08:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631286629; cv=none; d=google.com; s=arc-20160816; b=SQFMDo3niYyl7N+e6FtS2N67ugl462UYrRhf6jaZPFMW25uJ4Bakdyw2Ed6FE6zZRJ iPPaPoGNJpwZpJr9dfGvUcVSKzbo6Qcj9tghA9r79s743QU6PAL5OU6WAxM30r2yJDl1 xnk1uDj7W8O1gnNBK66xZnn92kKQeLnK4ATxIqsc1lESu4gwMNID/htGsMUMLrTVzl1b NlNHChX5FuA599IcPiIkFrHVuG8IoHmP8nRUnAu5fv+yoaTyzMQ7xdDMf+VyvzVroGDx xe760WtScgUb8mezGVugJnf0jUch838iTMFy+U4gN1yk5doFH/uW7YTOPyobMjgUP30n wmWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=hL1zCwUiJ6hoIGlHwhgGP4f+imH+ev7xCevX0zajur0=; b=r5c248tx9odKJQqkx0OQV77hWYeKdxgyODWKVfsukXFa8S/wwdgMsNzkh1vlM6oL6O k6AJtjmlYC+qGF1US0jElXcSJ67duTi+L2ppDmwl4IPjDbYIWzTdR8kNNrHcJzOAK8L6 ovG3eH0mMyniPI0UuswNCsBt6aznpP8Bad0I5TwUk0oo0LHPEzZjKBSlC9pJqz8y0KmN 8twTKqKp8U169NamfOoVBlkBscftuV44fMZE7VIekaKmawD8Uv8R0h7Es67KVVoEzOAp t4mBgezF/IJ92narPWgX0KeRaJwCElOM6HUu1RgGXjwQgRriqCtpHdXOSvXbvDOoJ/tL ahog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aJWH063v; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si5336404ild.77.2021.09.10.08.10.15; Fri, 10 Sep 2021 08:10:29 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aJWH063v; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234200AbhIJPKW (ORCPT + 99 others); Fri, 10 Sep 2021 11:10:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234141AbhIJPKW (ORCPT ); Fri, 10 Sep 2021 11:10:22 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12D45C061574; Fri, 10 Sep 2021 08:09:11 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id w19so3294849oik.10; Fri, 10 Sep 2021 08:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hL1zCwUiJ6hoIGlHwhgGP4f+imH+ev7xCevX0zajur0=; b=aJWH063vakKMa/mWbAQvIPrxcWojIL00+4tEJylPGRzokbZNmQvDYbby+E+63mi8Si 3rvZFYky++YjRWuzixJNhA3WuTh/ette7OK6GE9NRJ01uZiZKYz60ijCfJrPEOa/PlyM 8aXL8IUdctEvfsJOUBPZzYBscnKWesO+dPTAQvFs36Ab0403Qap0ZIWAjmSPZ6u/kQQh etGaHNzZaePtMjemDrzfkCd8Unzy/NM7t/ful/GCVwqTsB1yxqyOiLsSD/HKwMkkRB8F 73XN5RPWSIyp4IVXEBI6aXl8sBohpTg5GzPDF7vRevuU0yCmjz01NwNn19vasRWo7pPZ qFAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hL1zCwUiJ6hoIGlHwhgGP4f+imH+ev7xCevX0zajur0=; b=R0xFBFNYFN0R8USXbvba9il66sXDftNuHp/w/0TpV27aO0Of29gki/Dc1/h1bnNzu8 1lJGAycwNtOxikWkradE1IS9uBxNyH9xLAR2UUskJbZVAfRz8COPhpbwF8c7cPG1erK8 GI0YhDuE/3r2edEvIeVUMIBuG06Co7hHR0E83fPxqKS5tYgwD5bFOWFdmdYvSgOwRKrz gd5MKXoDnWCHLGXeNgqpEspm9N9tm/g52EjJ5PqxMMgWzPiMcoL6N6d+povS34us4jgN lMobld6wkpz4X6kE7sDPaJUAuj8jpx0/VLbok2vbPnXHb+/73X4p63BIinXHmFgntdqN SnhQ== X-Gm-Message-State: AOAM532/dELsj0WXtvtqvwZ23/0ATXsNhxIZFSoWsHqssWEpqIF16KGu 4asmHG0LP0IJJ1bnsTT3p6A= X-Received: by 2002:aca:5344:: with SMTP id h65mr4587386oib.117.1631286550365; Fri, 10 Sep 2021 08:09:10 -0700 (PDT) Received: from ian.penurio.us ([47.184.51.90]) by smtp.gmail.com with ESMTPSA id w23sm1327423oih.4.2021.09.10.08.09.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Sep 2021 08:09:10 -0700 (PDT) Subject: Re: [PATCH v2 09/15] leds: trigger: blkdev: Check devices for activity and blink LEDs To: =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: axboe@kernel.dk, pavel@ucw.cz, linux-leds@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org References: <20210909222513.2184795-1-arequipeno@gmail.com> <20210909222513.2184795-10-arequipeno@gmail.com> <20210910041713.4722760a@thinkpad> From: Ian Pilcher Message-ID: <77111c57-dfb5-44c6-c4e9-e18afb468b6e@gmail.com> Date: Fri, 10 Sep 2021 10:09:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210910041713.4722760a@thinkpad> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/9/21 9:17 PM, Marek BehĂșn wrote: > So your code allows me to use a partition block device (like sda2) to > register with the blkdev LED trigger, but when I do this, the code will > disregard that I just want the LED to blink on activity on that one > partition. Instead you will blink for whole sda, since you are looking > at stats of only part0. > > Am I right? You can't add partitions, only whole devices. # echo vda2 > link_device -bash: echo: write error: No such device static int blkdev_match_name(struct device *const dev, const void *const name) { return dev->type == &disk_type && sysfs_streq(dev_to_disk(dev)->disk_name, name); } Partitions fail the dev->type == &disk_type check. -- ======================================================================== In Soviet Russia, Google searches you! ========================================================================