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

pv_write: check for lvmcache_add_mda failure

Add missing test of failing lvmcache_add_mda() call.
This commit is contained in:
Zdenek Kabelac 2013-11-22 13:25:27 +01:00
parent a50a297f6e
commit 3d3b8bfd1c
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.105 - Version 2.02.105 -
===================================== =====================================
Check for failure of lvmcache_add_mda() when writing pv.
Check for failure of dev_get_size() when reporting device size. Check for failure of dev_get_size() when reporting device size.
Drop extra unneeded '/' when scanning sysfs directory. Drop extra unneeded '/' when scanning sysfs directory.
Fix undef value if skipped clustered VG ignored for toollib PV seg. (2.02.103) Fix undef value if skipped clustered VG ignored for toollib PV seg. (2.02.103)

View File

@ -1328,8 +1328,10 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
mdac->area.size >> SECTOR_SHIFT); mdac->area.size >> SECTOR_SHIFT);
// if fmt is not the same as info->fmt we are in trouble // if fmt is not the same as info->fmt we are in trouble
lvmcache_add_mda(info, mdac->area.dev, if (!lvmcache_add_mda(info, mdac->area.dev,
mdac->area.start, mdac->area.size, mda_is_ignored(mda)); mdac->area.start, mdac->area.size,
mda_is_ignored(mda)))
return_0;
} }
if (!lvmcache_update_bas(info, pv)) if (!lvmcache_update_bas(info, pv))