mirror of
https://github.com/ceph/ceph
synced 2024-12-19 09:57:05 +00:00
tests: verify object map is updated after full copyup
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
parent
e2be3416ea
commit
f76f772006
@ -4,6 +4,7 @@
|
||||
#include "librbd/AioCompletion.h"
|
||||
#include "librbd/ImageWatcher.h"
|
||||
#include "librbd/internal.h"
|
||||
#include "librbd/ObjectMap.h"
|
||||
#include <boost/scope_exit.hpp>
|
||||
#include <boost/assign/list_of.hpp>
|
||||
#include <utility>
|
||||
@ -477,6 +478,17 @@ TEST_F(TestInternal, SnapshotCopyup)
|
||||
} else {
|
||||
ASSERT_TRUE(read_bl.is_zero());
|
||||
}
|
||||
|
||||
// verify the object map was properly updated
|
||||
if ((ictx2->features & RBD_FEATURE_OBJECT_MAP) != 0) {
|
||||
uint8_t state = OBJECT_EXISTS;
|
||||
if ((ictx2->features & RBD_FEATURE_DEEP_FLATTEN) != 0 &&
|
||||
it != snaps.begin() && snap_name != NULL) {
|
||||
state = OBJECT_EXISTS_CLEAN;
|
||||
}
|
||||
RWLock::WLocker object_map_locker(ictx2->object_map_lock);
|
||||
ASSERT_EQ(state, ictx2->object_map[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user