@@ -2599,6 +2599,7 @@ int Locker::issue_caps(CInode *in, Capability *only_cap)
25992599 in->find_snaprealm ()->inode ->ino (),
26002600 cap->get_cap_id (), cap->get_last_seq (),
26012601 pending, wanted, 0 , cap->get_mseq (),
2602+ cap->get_last_issue (),
26022603 mds->get_osd_epoch_barrier ());
26032604 in->encode_cap_message (m, cap);
26042605
@@ -2649,6 +2650,7 @@ int Locker::issue_caps(CInode *in, Capability *only_cap)
26492650 in->find_snaprealm ()->inode ->ino (),
26502651 cap->get_cap_id (), cap->get_last_seq (),
26512652 after, wanted, 0 , cap->get_mseq (),
2653+ cap->get_last_issue (),
26522654 mds->get_osd_epoch_barrier ());
26532655 in->encode_cap_message (m, cap);
26542656
@@ -2675,6 +2677,7 @@ void Locker::issue_truncate(CInode *in)
26752677 cap->get_cap_id (), cap->get_last_seq (),
26762678 cap->pending (), cap->wanted (), 0 ,
26772679 cap->get_mseq (),
2680+ cap->get_last_issue (),
26782681 mds->get_osd_epoch_barrier ());
26792682 in->encode_cap_message (m, cap);
26802683 mds->send_message_client_counted (m, cap->get_session ());
@@ -3165,6 +3168,7 @@ void Locker::share_inode_max_size(CInode *in, Capability *only_cap)
31653168 cap->pending (),
31663169 cap->wanted (), 0 ,
31673170 cap->get_mseq (),
3171+ cap->get_last_issue (),
31683172 mds->get_osd_epoch_barrier ());
31693173 in->encode_cap_message (m, cap);
31703174 mds->send_message_client_counted (m, cap->get_session ());
@@ -3375,10 +3379,10 @@ void Locker::handle_client_caps(const cref_t<MClientCaps> &m)
33753379 ref_t <MClientCaps> ack;
33763380 if (op == CEPH_CAP_OP_FLUSHSNAP) {
33773381 if (mds->logger ) mds->logger ->inc (l_mdss_ceph_cap_op_flushsnap_ack);
3378- ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSHSNAP_ACK, m->get_ino (), 0 , 0 , 0 , 0 , 0 , dirty, 0 , mds->get_osd_epoch_barrier ());
3382+ ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSHSNAP_ACK, m->get_ino (), 0 , 0 , 0 , 0 , 0 , dirty, 0 , 0 , mds->get_osd_epoch_barrier ());
33793383 } else {
33803384 if (mds->logger ) mds->logger ->inc (l_mdss_ceph_cap_op_flush_ack);
3381- ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSH_ACK, m->get_ino (), 0 , m->get_cap_id (), m->get_seq (), m->get_caps (), 0 , dirty, 0 , mds->get_osd_epoch_barrier ());
3385+ ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSH_ACK, m->get_ino (), 0 , m->get_cap_id (), m->get_seq (), m->get_caps (), 0 , dirty, 0 , 0 , mds->get_osd_epoch_barrier ());
33823386 }
33833387 ack->set_snap_follows (follows);
33843388 ack->set_client_tid (m->get_client_tid ());
@@ -3500,7 +3504,7 @@ void Locker::handle_client_caps(const cref_t<MClientCaps> &m)
35003504 // case we get a dup response, so whatever.)
35013505 ref_t <MClientCaps> ack;
35023506 if (dirty) {
3503- ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSHSNAP_ACK, in->ino (), 0 , 0 , 0 , 0 , 0 , dirty, 0 , mds->get_osd_epoch_barrier ());
3507+ ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSHSNAP_ACK, in->ino (), 0 , 0 , 0 , 0 , 0 , dirty, 0 , 0 , mds->get_osd_epoch_barrier ());
35043508 ack->set_snap_follows (follows);
35053509 ack->set_client_tid (m->get_client_tid ());
35063510 ack->set_oldest_flush_tid (m->get_oldest_flush_tid ());
@@ -3589,7 +3593,7 @@ void Locker::handle_client_caps(const cref_t<MClientCaps> &m)
35893593 dout (7 ) << " flush client." << client << " dirty " << ccap_string (dirty)
35903594 << " seq " << m->get_seq () << " on " << *in << dendl;
35913595 ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSH_ACK, in->ino (), 0 , cap->get_cap_id (), m->get_seq (),
3592- m->get_caps (), 0 , dirty, 0 , mds->get_osd_epoch_barrier ());
3596+ m->get_caps (), 0 , dirty, 0 , cap-> get_last_issue (), mds->get_osd_epoch_barrier ());
35933597 ack->set_client_tid (m->get_client_tid ());
35943598 ack->set_oldest_flush_tid (m->get_oldest_flush_tid ());
35953599 }
@@ -4222,7 +4226,7 @@ void Locker::handle_client_cap_release(const cref_t<MClientCapRelease> &m)
42224226 Session *session = mds->get_session (m);
42234227
42244228 for (const auto &cap : m->caps ) {
4225- _do_cap_release (client, inodeno_t ((uint64_t )cap.ino ) , cap.cap_id , cap.migrate_seq , cap.seq );
4229+ _do_cap_release (client, inodeno_t ((uint64_t )cap.ino ) , cap.cap_id , cap.migrate_seq , cap.issue_seq );
42264230 }
42274231
42284232 if (session) {
0 commit comments