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:
parent
30e27d2f8b
commit
e6d3587482
@ -1268,8 +1268,12 @@ static int _online_devs(struct cmd_context *cmd, int do_all, struct dm_list *pvs
|
|||||||
}
|
}
|
||||||
|
|
||||||
devsize = dev->size;
|
devsize = dev->size;
|
||||||
if (!devsize)
|
if (!devsize &&
|
||||||
dev_get_size(dev, &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;
|
do_full_check = 0;
|
||||||
|
|
||||||
/* If use_full_md_check is set then this has already been done by filter. */
|
/* If use_full_md_check is set then this has already been done by filter. */
|
||||||
|
Loading…
Reference in New Issue
Block a user