osdc/Objecter: track latest epoch in op_target_t

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-02-20 13:19:39 -05:00
parent fce285a5ff
commit 57dfcb62c1
2 changed files with 6 additions and 1 deletions

View File

@ -2661,7 +2661,9 @@ int Objecter::_calc_target(op_target_t *t, Connection *con, bool any_change)
// rwlock is locked
bool is_read = t->flags & CEPH_OSD_FLAG_READ;
bool is_write = t->flags & CEPH_OSD_FLAG_WRITE;
ldout(cct,20) << __func__ << " base " << t->base_oid << " " << t->base_oloc
t->epoch = osdmap->get_epoch();
ldout(cct,20) << __func__ << " epoch " << t->epoch
<< " base " << t->base_oid << " " << t->base_oloc
<< " precalc_pgid " << (int)t->precalc_pgid
<< " pgid " << t->base_pgid
<< (is_read ? " is_read" : "")

View File

@ -1182,6 +1182,9 @@ public:
struct op_target_t {
int flags = 0;
epoch_t epoch = 0; ///< latest epoch we calculated the mapping
object_t base_oid;
object_locator_t base_oloc;
object_t target_oid;