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>