1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Peter Rajnoha 9918d95490 metadata: do not issue warning message about PV dev size being 0 when the device has gone just after VG read
There's a window between doing VG read and checking PV device size
against real device size. If the device is removed in this window,
the dev cache still holds struct device and pv->dev still references
that and that PV is not marked as missing. However, if we're trying
to get size for such device, the open fails because that device
doesn't exists anymore.

We called existing pv_dev_size in _check_pv_dev_sizes fn. But
pv_dev_size assigned a size of 0 if the dev_get_size it called failed
(because the device is gone).

So call the dev_get_size directly and check for the return code
in _check_pv_dev_sizes and go further only if we really know the
device size. This is to avoid confusing warning messages like:

  Device /dev/sdd1 has size of 0 sectors which is smaller than corresponding PV size of 31455207 sectors. Was device resized?
  One or more devices used as PVs in VG helter_skelter have changed sizes.
2016-03-10 13:11:15 +01:00
..
activate cleanup: use lv_is_partial 2016-03-03 10:17:03 +01:00
cache cleanup: drop unneeded test 2016-02-25 23:30:25 +01:00
cache_segtype metadata: add support for interconnection of thin pool LV segment with indirect origin 2016-03-03 13:46:40 +01:00
commands dbus: add notification from commands 2016-03-07 10:06:09 -06:00
config remove unused define 2016-03-09 13:38:04 -06:00
datastruct doc: change fsf address 2016-01-21 12:11:37 +01:00
device pvs: replace 'unknown device' with [unknown] 2016-03-01 11:12:03 -06:00
display commands: lvdisplay: recognize -H|--history switch 2016-03-04 10:27:45 +01:00
error doc: change fsf address 2016-01-21 12:11:37 +01:00
filters filter: do not check for suspended devs in filter-usable in lvmetad mode 2016-02-03 14:57:36 +01:00
format1 redefine pvcreate structs 2016-02-25 09:14:10 -06:00
format_pool redefine pvcreate structs 2016-02-25 09:14:10 -06:00
format_text coverity: fix possible resource leak in _print_historical_lv function 2016-03-07 10:43:50 +01:00
freeseg doc: change fsf address 2016-01-21 12:11:37 +01:00
label doc: change fsf address 2016-01-21 12:11:37 +01:00
locking lvmlockd: fix sparse snapshot case 2016-02-23 15:45:25 -06:00
log dbus: add notification from commands 2016-03-07 10:06:09 -06:00
lvmpolld doc: change fsf address 2016-01-21 12:11:37 +01:00
metadata metadata: do not issue warning message about PV dev size being 0 when the device has gone just after VG read 2016-03-10 13:11:15 +01:00
mirror doc: change fsf address 2016-01-21 12:11:37 +01:00
misc pvs: replace 'unknown device' with [unknown] 2016-03-01 11:12:03 -06:00
mm doc: change fsf address 2016-01-21 12:11:37 +01:00
notify vgscan: add --notifydbus to send a notification 2016-03-07 10:50:45 -06:00
properties doc: change fsf address 2016-01-21 12:11:37 +01:00
raid gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
replicator doc: change fsf address 2016-01-21 12:11:37 +01:00
report report: Tidy some field names, widths and headings. 2016-03-08 19:50:22 +00:00
snapshot doc: change fsf address 2016-01-21 12:11:37 +01:00
striped doc: change fsf address 2016-01-21 12:11:37 +01:00
thin metadata: add support for interconnection of thin pool LV segment with indirect origin 2016-03-03 13:46:40 +01:00
unknown doc: change fsf address 2016-01-21 12:11:37 +01:00
uuid doc: change fsf address 2016-01-21 12:11:37 +01:00
zero doc: change fsf address 2016-01-21 12:11:37 +01:00
Makefile.in dbus: add notification from commands 2016-03-07 10:06:09 -06:00