summaryrefslogtreecommitdiffstats
path: root/src/mds
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@ibm.com>2024-11-13 04:12:27 +0100
committerPatrick Donnelly <pdonnell@ibm.com>2024-11-13 04:12:27 +0100
commit3829eb6f08678307d153c10051ee774dda780566 (patch)
tree05fac2c151286501ec46016fd7a53dea03c11b7c /src/mds
parentMerge PR #60226 into main (diff)
parentmds: add issue_seq to all cap messages (diff)
downloadceph-3829eb6f08678307d153c10051ee774dda780566.tar.xz
ceph-3829eb6f08678307d153c10051ee774dda780566.zip
Merge PR #60283 into main
* refs/pull/60283/head: mds: add issue_seq to all cap messages include/ceph_fs: correct ceph_mds_cap_peer field name include/ceph_fs: correct ceph_mds_cap_item field name messages/MClientCaps: use correct ceph_seq_t for cap sequence types messages/MClientCaps: dump issue_seq for debugging mds: remove dead code Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'src/mds')
-rw-r--r--src/mds/Capability.h2
-rw-r--r--src/mds/Locker.cc14
-rw-r--r--src/mds/MDCache.cc2
3 files changed, 10 insertions, 8 deletions
diff --git a/src/mds/Capability.h b/src/mds/Capability.h
index 9adcf3b25b9..0782464ad94 100644
--- a/src/mds/Capability.h
+++ b/src/mds/Capability.h
@@ -218,8 +218,6 @@ public:
void set_cap_id(uint64_t i) { cap_id = i; }
uint64_t get_cap_id() const { return cap_id; }
- //ceph_seq_t get_last_issue() { return last_issue; }
-
bool is_suppress() const { return suppress > 0; }
void inc_suppress() { suppress++; }
void dec_suppress() { suppress--; }
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index 63608d48864..d64f176acb6 100644
--- a/src/mds/Locker.cc
+++ b/src/mds/Locker.cc
@@ -2599,6 +2599,7 @@ int Locker::issue_caps(CInode *in, Capability *only_cap)
in->find_snaprealm()->inode->ino(),
cap->get_cap_id(), cap->get_last_seq(),
pending, wanted, 0, cap->get_mseq(),
+ cap->get_last_issue(),
mds->get_osd_epoch_barrier());
in->encode_cap_message(m, cap);
@@ -2649,6 +2650,7 @@ int Locker::issue_caps(CInode *in, Capability *only_cap)
in->find_snaprealm()->inode->ino(),
cap->get_cap_id(), cap->get_last_seq(),
after, wanted, 0, cap->get_mseq(),
+ cap->get_last_issue(),
mds->get_osd_epoch_barrier());
in->encode_cap_message(m, cap);
@@ -2675,6 +2677,7 @@ void Locker::issue_truncate(CInode *in)
cap->get_cap_id(), cap->get_last_seq(),
cap->pending(), cap->wanted(), 0,
cap->get_mseq(),
+ cap->get_last_issue(),
mds->get_osd_epoch_barrier());
in->encode_cap_message(m, cap);
mds->send_message_client_counted(m, cap->get_session());
@@ -3165,6 +3168,7 @@ void Locker::share_inode_max_size(CInode *in, Capability *only_cap)
cap->pending(),
cap->wanted(), 0,
cap->get_mseq(),
+ cap->get_last_issue(),
mds->get_osd_epoch_barrier());
in->encode_cap_message(m, cap);
mds->send_message_client_counted(m, cap->get_session());
@@ -3375,10 +3379,10 @@ void Locker::handle_client_caps(const cref_t<MClientCaps> &m)
ref_t<MClientCaps> ack;
if (op == CEPH_CAP_OP_FLUSHSNAP) {
if (mds->logger) mds->logger->inc(l_mdss_ceph_cap_op_flushsnap_ack);
- ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSHSNAP_ACK, m->get_ino(), 0, 0, 0, 0, 0, dirty, 0, mds->get_osd_epoch_barrier());
+ 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());
} else {
if (mds->logger) mds->logger->inc(l_mdss_ceph_cap_op_flush_ack);
- 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());
+ 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());
}
ack->set_snap_follows(follows);
ack->set_client_tid(m->get_client_tid());
@@ -3500,7 +3504,7 @@ void Locker::handle_client_caps(const cref_t<MClientCaps> &m)
// case we get a dup response, so whatever.)
ref_t<MClientCaps> ack;
if (dirty) {
- ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSHSNAP_ACK, in->ino(), 0, 0, 0, 0, 0, dirty, 0, mds->get_osd_epoch_barrier());
+ ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSHSNAP_ACK, in->ino(), 0, 0, 0, 0, 0, dirty, 0, 0, mds->get_osd_epoch_barrier());
ack->set_snap_follows(follows);
ack->set_client_tid(m->get_client_tid());
ack->set_oldest_flush_tid(m->get_oldest_flush_tid());
@@ -3589,7 +3593,7 @@ void Locker::handle_client_caps(const cref_t<MClientCaps> &m)
dout(7) << " flush client." << client << " dirty " << ccap_string(dirty)
<< " seq " << m->get_seq() << " on " << *in << dendl;
ack = make_message<MClientCaps>(CEPH_CAP_OP_FLUSH_ACK, in->ino(), 0, cap->get_cap_id(), m->get_seq(),
- m->get_caps(), 0, dirty, 0, mds->get_osd_epoch_barrier());
+ m->get_caps(), 0, dirty, 0, cap->get_last_issue(), mds->get_osd_epoch_barrier());
ack->set_client_tid(m->get_client_tid());
ack->set_oldest_flush_tid(m->get_oldest_flush_tid());
}
@@ -4222,7 +4226,7 @@ void Locker::handle_client_cap_release(const cref_t<MClientCapRelease> &m)
Session *session = mds->get_session(m);
for (const auto &cap : m->caps) {
- _do_cap_release(client, inodeno_t((uint64_t)cap.ino) , cap.cap_id, cap.migrate_seq, cap.seq);
+ _do_cap_release(client, inodeno_t((uint64_t)cap.ino) , cap.cap_id, cap.migrate_seq, cap.issue_seq);
}
if (session) {
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index eb2b529dcfa..d822f196960 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -5891,7 +5891,7 @@ void MDCache::do_cap_import(Session *session, CInode *in, Capability *cap,
auto reap = make_message<MClientCaps>(CEPH_CAP_OP_IMPORT,
in->ino(), realm->inode->ino(), cap->get_cap_id(),
cap->get_last_seq(), cap->pending(), cap->wanted(),
- 0, cap->get_mseq(), mds->get_osd_epoch_barrier());
+ 0, cap->get_mseq(), cap->get_last_issue(), mds->get_osd_epoch_barrier());
in->encode_cap_message(reap, cap);
reap->snapbl = mds->server->get_snap_trace(session, realm);
reap->set_cap_peer(p_cap_id, p_seq, p_mseq, peer, p_flags);