diff options
author | David Teigland <teigland@redhat.com> | 2020-09-28 13:21:44 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2020-09-28 13:25:57 -0500 |
commit | fb96e9ab217641ec3a967d9aa2be01fc936ee038 (patch) | |
tree | a8205e3fd5ddd5357e526c1903c3f4ec00af76cf /lib/cache | |
parent | df6f16c081ffca48f2c812e539851995b7563b68 (diff) | |
download | lvm2-fb96e9ab217641ec3a967d9aa2be01fc936ee038.tar.gz |
tests: add case for metadata checksum differences
Cover the case where two copies of metadata have the
same seqno but different checksums. Also elaborate
on an existing fixme in the code for this case, since
we should be doing something better for this case.
This had been uncovering an issue with reopening
fds in readwrite mode.
Diffstat (limited to 'lib/cache')
-rw-r--r-- | lib/cache/lvmcache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index d8df4c796..9716eccaf 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -1663,6 +1663,9 @@ int lvmcache_update_vgname_and_id(struct cmd_context *cmd, struct lvmcache_info * second updated to seqno 4, first comes back and second goes * missing, first updated to seqno 4, second comes back, now * both are present with same seqno but different checksums. + * FIXME: we should check if the majority of mda copies have one + * checksum and if so use that copy of metadata, but if there's + * not a majority, don't allow the VG to be modified/activated. */ if ((vginfo->mda_size != vgsummary->mda_size) || (vginfo->mda_checksum != vgsummary->mda_checksum)) { |