[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77111c57-dfb5-44c6-c4e9-e18afb468b6e@gmail.com>
Date: Fri, 10 Sep 2021 10:09:09 -0500
From: Ian Pilcher <arequipeno@...il.com>
To: Marek BehĂșn <kabel@...nel.org>
Cc: axboe@...nel.dk, pavel@....cz, linux-leds@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org
Subject: Re: [PATCH v2 09/15] leds: trigger: blkdev: Check devices for
activity and blink LEDs
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!
========================================================================
Powered by blists - more mailing lists