Messages in this thread | | | Subject | Re: [PATCH v2 09/15] leds: trigger: blkdev: Check devices for activity and blink LEDs | From | Ian Pilcher <> | Date | Fri, 10 Sep 2021 16:23:02 -0500 |
| |
On 9/10/21 10:12 AM, Marek Behún wrote: > On Fri, 10 Sep 2021 10:09:09 -0500 > Ian Pilcher <arequipeno@gmail.com> wrote: >> You can't add partitions, only whole devices. > > But I should be able to, since partition is a block device in /dev. > Any block device from /sys/class/block should be possible to add.
I wasn't aware that was something that you were interested in doing. This will require working with the block_device structure rather than the gendisk.
One possible benefit of this change ... Assuming that block_device structures are always allocated by bdev_alloc() *and* I'm correct in thinking that this means that they are always allocated from the inode cache, then they are always zeroed out when allocated, so there won't be any need to explicitly initialize the pointer.
-- ======================================================================== In Soviet Russia, Google searches you! ========================================================================
| |