1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: check dev_get_size result

Check we have obtained some device size out of dev_get_size().
This commit is contained in:
Zdenek Kabelac 2021-09-21 18:50:26 +02:00
parent 30e27d2f8b
commit e6d3587482

View File

@ -1268,8 +1268,12 @@ static int _online_devs(struct cmd_context *cmd, int do_all, struct dm_list *pvs
}
devsize = dev->size;
if (!devsize)
dev_get_size(dev, &devsize);
if (!devsize &&
!dev_get_size(dev, &devsize)) {
log_print("pvscan[%d] PV %s can get device size.", getpid(), dev_name(dev));
release_vg(vg);
continue;
}
do_full_check = 0;
/* If use_full_md_check is set then this has already been done by filter. */