Re: [PATCH v2 1/2] virdevmapper: Don't cache device-mapper major

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 18, 2020 at 11:30:24 +0200, Michal Privoznik wrote:
> The device mapper major is needed in virIsDevMapperDevice() which
> determines whether given device is managed by device-mapper. This
> number is obtained by parsing /proc/devices and then stored in a
> global variable so that the file doesn't have to be parsed again.
> However, as it turns out this logic is flawed - the major number
> is not static and can change as it can be specified as a
> parameter when loading the dm-mod module.
> 
> Unfortunately, I was not able to come up with a good solution and
> thus the /proc/devices file is being parsed every time we need
> the device mapper major.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/util/virdevmapper.c | 17 +++++------------
>  1 file changed, 5 insertions(+), 12 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux