diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2016-01-22 11:13:00 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2016-01-22 14:16:00 +0100 |
commit | 1f5dfb7369600c169ecd2c78e0cd079ad1442548 (patch) | |
tree | ed7b12affec5e84a7d0c1bf70c20379343c67348 | |
parent | d090d6574e455625ad4e2a1a6f3d93f5c663b097 (diff) | |
download | lvm2-1f5dfb7369600c169ecd2c78e0cd079ad1442548.tar.gz |
lvmcache: invalidate all cached dev sizes if all VGs got unlocked
-rw-r--r-- | lib/cache/lvmcache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 2864ffb45..4a4b53f90 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -452,8 +452,10 @@ void lvmcache_unlock_vgname(const char *vgname) dm_hash_remove(_lock_hash, vgname); /* FIXME Do this per-VG */ - if (strcmp(vgname, VG_GLOBAL) && !--_vgs_locked) + if (strcmp(vgname, VG_GLOBAL) && !--_vgs_locked) { dev_close_all(); + dev_size_seqno_inc(); /* invalidate all cached dev sizes */ + } } int lvmcache_vgs_locked(void) |