[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] linux/hostdisk: use stat() instead of udevadm for par
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2 2/2] linux/hostdisk: use stat() instead of udevadm for partition lookup |
Date: |
Wed, 21 Jul 2021 16:22:31 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Jul 15, 2021 at 05:35:28PM +0200, Petr Vorel wrote:
> From: Jeff Mahoney <jeffm@suse.com>
>
> sysfs_partition_path() calls udevadm to resolve the sysfs path for
> a block device. That can be accomplished by stating the device node
> and using the major/minor to follow the symlinks in /sys/dev/block/.
>
> This cuts the execution time of grub-mkconfig to somewhere near 55% on
> system without LVM (which uses libdevmapper instead sysfs_partition_path()).
>
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> [ pvorel: remove udevadm fallback as it does not help us more than
> calling stat() directly; include <grub/osdep/major.h>, update commit
> message. ]
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel