diff --git a/WHATS_NEW b/WHATS_NEW index 5528b0569..c86e86134 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.78 - ==================================== + Add backtraces for dev_set() and dev_close_immediate() errors in set_lv(). Add logging for unlink() error in clvmd remove_lockfile(). Add logging for pipe write() and close() error in clvmd child_init_signal(). Add test for existance of orphan vginfo in _lvmcache_update_vgname(). diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 31f1ff327..6f553cd6f 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -3033,9 +3033,13 @@ int set_lv(struct cmd_context *cmd, struct logical_volume *lv, if (sectors > lv->size) sectors = lv->size; - dev_set(dev, UINT64_C(0), (size_t) sectors << SECTOR_SHIFT, value); + if (!dev_set(dev, UINT64_C(0), (size_t) sectors << SECTOR_SHIFT, value)) + stack; + dev_flush(dev); - dev_close_immediate(dev); + + if (!dev_close_immediate(dev)) + stack; return 1; }