The cache_load call in mount_action ignores the device name parameter:
As such, each hotplug event (specifically, each /sbin/block hotplug invoked via /etc/hotplug.d/block/10-mount via /sbin/hotplug-call through the machinations of /etc/hotplug.json) probes all the block devices named here:
|
static void cache_load(int mtd) |
|
{ |
|
if (mtd) { |
|
_cache_load("/dev/mtdblock*"); |
|
_cache_load("/dev/ubiblock*"); |
|
_cache_load("/dev/ubi[0-9]*"); |
|
} |
|
_cache_load("/dev/loop*"); |
|
_cache_load("/dev/mmcblk*"); |
|
_cache_load("/dev/sd*"); |
|
_cache_load("/dev/hd*"); |
|
_cache_load("/dev/md*"); |
|
_cache_load("/dev/nvme*"); |
|
_cache_load("/dev/vd*"); |
|
_cache_load("/dev/xvd*"); |
|
_cache_load("/dev/dm-*"); |
|
} |
That's rather a lot, if not all, of the block devices on the system, making the total block hotplug sequence
accidentally quadratic.
I hope this is the right place to raise this issue, and I've also documented a bit about how I found this over in this forum thread, but if it belongs somewhere else, please let me know.
The
cache_loadcall inmount_actionignores the device name parameter:fstools/block.c
Line 1256 in bfe882d
As such, each hotplug event (specifically, each
/sbin/block hotpluginvoked via/etc/hotplug.d/block/10-mountvia/sbin/hotplug-callthrough the machinations of/etc/hotplug.json) probes all the block devices named here:fstools/block.c
Lines 580 to 596 in bfe882d
That's rather a lot, if not all, of the block devices on the system, making the total block hotplug sequence accidentally quadratic.
I hope this is the right place to raise this issue, and I've also documented a bit about how I found this over in this forum thread, but if it belongs somewhere else, please let me know.