From babfd42d81be016bc84ec3678618a233547ebb96 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 7 Jan 2009 13:33:17 -0800 Subject: [PATCH] mds: expire rdcaps Make sure mds and client agree on the wanted value. --- src/include/ceph_fs.h | 2 +- src/kernel/caps.c | 43 +++++++++++++++++++++----------- src/kernel/inode.c | 14 ++++++----- src/kernel/super.h | 5 ++-- src/mds/CInode.cc | 11 +++++---- src/mds/CInode.h | 16 +++++++----- src/mds/Capability.h | 57 ++++++++++++++++++++++++++++--------------- src/mds/Locker.cc | 3 +-- src/mds/MDCache.cc | 42 ++++++++++++++++++++++++++++--- src/mds/MDCache.h | 9 +++++-- src/mds/MDS.cc | 1 + src/mds/Migrator.cc | 3 +-- src/mds/Server.cc | 3 +-- src/mds/SessionMap.h | 3 ++- 14 files changed, 147 insertions(+), 65 deletions(-) diff --git a/src/include/ceph_fs.h b/src/include/ceph_fs.h index 98111e96eb2bb..a79822a1a6b30 100644 --- a/src/include/ceph_fs.h +++ b/src/include/ceph_fs.h @@ -819,7 +819,7 @@ struct ceph_frag_tree_head { } __attribute__ ((packed)); struct ceph_mds_reply_cap { - __le32 caps; + __le32 caps, wanted; __le32 seq, mseq; __le64 realm; __le32 ttl_ms; /* ttl, in ms. if readonly and unwanted. */ diff --git a/src/kernel/caps.c b/src/kernel/caps.c index 4a6528f77de4f..96e5b9c49c995 100644 --- a/src/kernel/caps.c +++ b/src/kernel/caps.c @@ -177,9 +177,9 @@ static void __insert_cap_node(struct ceph_inode_info *ci, */ int ceph_add_cap(struct inode *inode, struct ceph_mds_session *session, - int fmode, unsigned issued, + int fmode, unsigned issued, unsigned wanted, unsigned seq, unsigned mseq, u64 realmino, - unsigned ttl_ms, + unsigned ttl_ms, unsigned long ttl_from, struct ceph_cap *new_cap) { struct ceph_mds_client *mdsc = &ceph_inode_to_client(inode)->mdsc; @@ -207,6 +207,7 @@ retry: cap->issued = cap->implemented = 0; cap->flushing = 0; + cap->mds_wanted = wanted; cap->mds = mds; is_first = RB_EMPTY_ROOT(&ci->i_caps); /* grab inode later */ @@ -247,7 +248,7 @@ retry: cap->seq = seq; cap->mseq = mseq; cap->gen = session->s_cap_gen; - cap->expires = jiffies + (ttl_ms * HZ / 1000); + cap->expires = ttl_from + (ttl_ms * HZ / 1000); if (fmode >= 0) __ceph_get_fmode(ci, fmode); spin_unlock(&inode->i_lock); @@ -449,15 +450,20 @@ static void send_cap_msg(struct ceph_mds_client *mdsc, u64 ino, int op, fc->wanted = cpu_to_le32(wanted); fc->dirty = cpu_to_le32(dirty); fc->ino = cpu_to_le64(ino); + fc->snap_follows = cpu_to_le64(follows); + fc->size = cpu_to_le64(size); fc->max_size = cpu_to_le64(max_size); - fc->snap_follows = cpu_to_le64(follows); if (mtime) ceph_encode_timespec(&fc->mtime, mtime); if (atime) ceph_encode_timespec(&fc->atime, atime); fc->time_warp_seq = cpu_to_le64(time_warp_seq); + fc->uid = cpu_to_le32(uid); + fc->gid = cpu_to_le32(gid); + fc->mode = cpu_to_le32(mode); + ceph_send_msg_mds(mdsc, msg, mds); } @@ -524,6 +530,8 @@ static void __send_cap(struct ceph_mds_client *mdsc, wake = 1; } + cap->mds_wanted = want; + keep = cap->issued; flushing = cap->flushing; seq = cap->seq; @@ -694,7 +702,7 @@ void ceph_check_caps(struct ceph_inode_info *ci, int is_delayed, int drop) int file_wanted, used; struct ceph_mds_session *session = NULL; /* if set, i hold s_mutex */ int took_snap_rwsem = 0; /* true if mdsc->snap_rwsem held */ - int retain, revoking; + int want, retain, revoking; int mds = -1; /* keep track of how far we've gone through i_caps list to avoid an infinite loop on retry */ struct rb_node *p; @@ -716,7 +724,9 @@ retry_locked: file_wanted = __ceph_caps_file_wanted(ci); used = __ceph_caps_used(ci); - retain = file_wanted | used; + want = file_wanted | used; + + retain = want; if (!mdsc->stopping) retain |= CEPH_CAP_PIN | (S_ISDIR(inode->i_mode) ? CEPH_CAP_ANY_RDCACHE : @@ -805,6 +815,10 @@ retry_locked: if (!revoking && mdsc->stopping && (used == 0)) goto ack; + /* adjust wanted? */ + if (cap->mds_wanted != want) + goto ack; + if ((cap->issued & ~retain) == 0) continue; /* nothing extra, all good */ @@ -847,7 +861,7 @@ ack: mds = cap->mds; /* remember mds, so we don't repeat */ /* __send_cap drops i_lock */ - __send_cap(mdsc, session, cap, used, file_wanted|used, retain); + __send_cap(mdsc, session, cap, used, want, retain); goto retry; /* retake i_lock and restart our cap scan. */ } @@ -1474,10 +1488,12 @@ static void handle_cap_import(struct ceph_mds_client *mdsc, struct ceph_inode_info *ci = ceph_inode(inode); int mds = session->s_mds; unsigned issued = le32_to_cpu(im->caps); + unsigned wanted = le32_to_cpu(im->wanted); unsigned seq = le32_to_cpu(im->seq); unsigned mseq = le32_to_cpu(im->migrate_seq); u64 realmino = le64_to_cpu(im->realm); struct ceph_snap_realm *realm; + unsigned long ttl_ms = le32_to_cpu(im->ttl_ms); if (ci->i_cap_exporting_mds >= 0 && ci->i_cap_exporting_mseq < mseq) { @@ -1495,8 +1511,8 @@ static void handle_cap_import(struct ceph_mds_client *mdsc, realm = ceph_update_snap_trace(mdsc, snaptrace, snaptrace+snaptrace_len, false); - ceph_add_cap(inode, session, -1, issued, seq, mseq, realmino, - le32_to_cpu(im->ttl_ms), NULL); + ceph_add_cap(inode, session, -1, issued, wanted, seq, mseq, realmino, + ttl_ms, jiffies - ttl_ms/2, NULL); ceph_put_snap_realm(mdsc, realm); } @@ -1683,21 +1699,19 @@ void ceph_trim_session_rdcaps(struct ceph_mds_session *session) struct inode *inode; struct ceph_cap *cap; struct list_head *p, *n; - int wanted; + int wanted, last_cap; dout(10, "trim_rdcaps for mds%d\n", session->s_mds); list_for_each_safe(p, n, &session->s_rdcaps) { cap = list_entry(p, struct ceph_cap, session_rdcaps); inode = &cap->ci->vfs_inode; - igrab(inode); spin_lock(&inode->i_lock); if (time_before(jiffies, cap->expires)) { dout(20, " stopping at %p cap %p expires %lu > %lu\n", inode, cap, cap->expires, jiffies); spin_unlock(&inode->i_lock); - iput(inode); break; } @@ -1705,12 +1719,13 @@ void ceph_trim_session_rdcaps(struct ceph_mds_session *session) wanted = __ceph_caps_wanted(cap->ci); if (wanted == 0) { dout(20, " dropping %p cap %p\n", inode, cap); - __ceph_remove_cap(cap); + last_cap = __ceph_remove_cap(cap); } else { dout(20, " keeping %p cap %p (wanted %s)\n", inode, cap, ceph_cap_string(wanted)); } spin_unlock(&inode->i_lock); - iput(inode); + if (last_cap) + iput(inode); } } diff --git a/src/kernel/inode.c b/src/kernel/inode.c index 43d1d239aa5f1..8f45fddfcd282 100644 --- a/src/kernel/inode.c +++ b/src/kernel/inode.c @@ -390,7 +390,7 @@ static int fill_inode(struct inode *inode, struct ceph_mds_reply_info_in *iinfo, struct ceph_mds_reply_dirfrag *dirinfo, struct ceph_mds_session *session, - int cap_fmode) + unsigned long ttl_from, int cap_fmode) { struct ceph_mds_reply_inode *info = iinfo->in; struct ceph_inode_info *ci = ceph_inode(inode); @@ -491,9 +491,10 @@ no_change: if (info->cap.caps) { if (ceph_snap(inode) == CEPH_NOSNAP) { ceph_add_cap(inode, session, cap_fmode, - info->cap.caps, info->cap.seq, + info->cap.caps, info->cap.wanted, + info->cap.seq, info->cap.mseq, info->cap.realm, - info->cap.ttl_ms, + info->cap.ttl_ms, ttl_from, NULL); } else { spin_lock(&inode->i_lock); @@ -795,7 +796,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, err = fill_inode(in, &rinfo->trace_in[0], rinfo->trace_numd ? rinfo->trace_dir[0] : NULL, - session, -1); + session, req->r_request_started, -1); if (err < 0) return err; if (unlikely(sb->s_root == NULL)) @@ -955,7 +956,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, &rinfo->trace_in[d+1], rinfo->trace_numd <= d ? rinfo->trace_dir[d+1] : NULL, - session, + session, req->r_request_started, (d == rinfo->trace_numd-1 && le32_to_cpu(rinfo->head->result) == 0) ? req->r_fmode : -1); @@ -1155,7 +1156,8 @@ retry_lookup: dn = splice_dentry(dn, in, NULL); } - if (fill_inode(in, &rinfo->dir_in[i], NULL, session, -1) < 0) { + if (fill_inode(in, &rinfo->dir_in[i], NULL, session, + req->r_request_started, -1) < 0) { dout(0, "fill_inode badness on %p\n", in); dput(dn); continue; diff --git a/src/kernel/super.h b/src/kernel/super.h index d46b4448040b7..891e2bc1cf075 100644 --- a/src/kernel/super.h +++ b/src/kernel/super.h @@ -137,6 +137,7 @@ struct ceph_cap { int issued; /* latest, from the mds */ int implemented; /* what we've implemented (for tracking revocation) */ int flushing; /* dirty fields being written back to mds */ + int mds_wanted; u32 seq, mseq, gen; unsigned long expires; /* if readonly and unwanted (jiffies) */ }; @@ -654,9 +655,9 @@ extern void ceph_handle_caps(struct ceph_mds_client *mdsc, struct ceph_msg *msg); extern int ceph_add_cap(struct inode *inode, struct ceph_mds_session *session, - int fmode, unsigned issued, + int fmode, unsigned issued, unsigned wanted, unsigned cap, unsigned seq, u64 realmino, - unsigned ttl_ms, + unsigned ttl_ms, unsigned long ttl_from, struct ceph_cap *new_cap); extern void ceph_remove_cap(struct ceph_cap *cap); extern int ceph_get_cap_mds(struct inode *inode); diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 802e934f4d14c..3e9b45d6ab07a 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -1348,11 +1348,10 @@ bool CInode::encode_inodestat(bufferlist& bl, Session *session, e.cap.mseq = 0; e.cap.realm = 0; } else { - if (valid && !cap && is_auth()) { + if (valid && !cap && is_auth()) // add a new cap - cap = add_client_cap(client, find_snaprealm()); - session->touch_cap(cap); - } + cap = add_client_cap(client, session, &mdcache->client_rdcaps, find_snaprealm()); + if (cap && valid) { bool loner = (get_loner() == client); int likes = get_caps_liked(); @@ -1361,8 +1360,9 @@ bool CInode::encode_inodestat(bufferlist& bl, Session *session, issue |= CEPH_CAP_AUTH_EXCL; // | CEPH_CAP_XATTR_EXCL; cap->issue(issue); cap->set_last_issue_stamp(g_clock.recent_now()); - cap->touch(); + cap->touch(); // move to back of session cap LRU e.cap.caps = issue; + e.cap.wanted = cap->wanted(); e.cap.seq = cap->get_last_seq(); dout(10) << "encode_inodestat issueing " << ccap_string(issue) << " seq " << cap->get_last_seq() << dendl; e.cap.mseq = cap->get_mseq(); @@ -1373,6 +1373,7 @@ bool CInode::encode_inodestat(bufferlist& bl, Session *session, e.cap.seq = 0; e.cap.mseq = 0; e.cap.realm = 0; + e.cap.wanted = 0; e.cap.ttl_ms = 0; } } diff --git a/src/mds/CInode.h b/src/mds/CInode.h index f5829fae024f3..e3f0aa39c5224 100644 --- a/src/mds/CInode.h +++ b/src/mds/CInode.h @@ -30,6 +30,7 @@ #include "LocalLock.h" #include "Capability.h" #include "snap.h" +#include "SessionMap.h" #include #include @@ -528,7 +529,7 @@ public: if (c) return c->pending(); return 0; } - Capability *add_client_cap(int client, SnapRealm *conrealm=0) { + Capability *add_client_cap(int client, Session *session, xlist *rdcaps_list, SnapRealm *conrealm=0) { if (client_caps.empty()) { get(PIN_CAPS); if (conrealm) @@ -539,10 +540,12 @@ public: } assert(client_caps.count(client) == 0); - Capability *cap = client_caps[client] = new Capability; - cap->set_inode(this); + Capability *cap = client_caps[client] = new Capability(this, client, rdcaps_list); + if (session) + session->add_cap(cap); + cap->client_follows = first-1; - + containing_realm->add_cap(client, cap); return cap; @@ -552,6 +555,7 @@ public: Capability *cap = client_caps[client]; cap->session_caps_item.remove_myself(); + cap->rdcaps_item.remove_myself(); containing_realm->remove_cap(client, cap); delete cap; @@ -575,12 +579,12 @@ public: containing_realm = realm; } - Capability *reconnect_cap(int client, ceph_mds_cap_reconnect& icr) { + Capability *reconnect_cap(int client, ceph_mds_cap_reconnect& icr, Session *session, xlist *rdcaps_list) { Capability *cap = get_client_cap(client); if (cap) { cap->merge(icr.wanted, icr.issued); } else { - cap = add_client_cap(client); + cap = add_client_cap(client, session, rdcaps_list); cap->set_wanted(icr.wanted); cap->issue(icr.issued); } diff --git a/src/mds/Capability.h b/src/mds/Capability.h index 130a1111bed9e..1355a73549d39 100644 --- a/src/mds/Capability.h +++ b/src/mds/Capability.h @@ -24,7 +24,6 @@ using namespace std; #include "config.h" - /* Capability protocol notes. @@ -100,11 +99,14 @@ public: private: CInode *inode; - __u32 wanted_caps; // what the client wants (ideally) + int client; + + __u32 _wanted; // what the client wants (ideally) //::decode(cap_history, bl); utime_t last_issue_stamp; + // simplest -------------------------- #if 0 __u32 _pending; @@ -131,6 +133,7 @@ public: bool is_null() { rinclude/eturn !_issued && !_pending; } #endif + // track up to N revocations --------- #if 1 static const int _max_revoke = 3; @@ -157,6 +160,8 @@ public: _revoke_before[_num_revoke] |= _pending|_issued; _revoke_seq[_num_revoke] = last_sent; } + + check_rdcaps_list(_pending, c, _wanted, _wanted); _pending = c; //last_issue = ++last_sent; @@ -204,27 +209,28 @@ public: snapid_t client_follows; xlist::item session_caps_item; + xlist *rdcaps_list; + xlist::item rdcaps_item; xlist::item snaprealm_caps_item; - Capability(CInode *i=0, int want=0, capseq_t s=0) : - inode(i), - wanted_caps(want), - //_pending(0), _issued(0), + Capability(CInode *i, int c, xlist *rl) : + inode(i), client(c), + _wanted(0), _pending(0), _issued(0), _num_revoke(0), - last_sent(s), - //last_issue(0), + last_sent(0), mseq(0), suppress(0), stale(false), releasing(0), client_follows(0), - session_caps_item(this), snaprealm_caps_item(this) { } + session_caps_item(this), rdcaps_list(rl), rdcaps_item(this), snaprealm_caps_item(this) { } capseq_t get_mseq() { return mseq; } capseq_t get_last_sent() { return last_sent; } utime_t get_last_issue_stamp() { return last_issue_stamp; } void touch() { - session_caps_item.move_to_back(); + if (rdcaps_item.is_on_xlist()) + rdcaps_item.move_to_back(); } void set_last_issue_stamp(utime_t t) { last_issue_stamp = t; } @@ -239,20 +245,33 @@ public: void set_stale(bool b) { stale = b; } CInode *get_inode() { return inode; } - void set_inode(CInode *i) { inode = i; } - + int get_client() { return client; } // caps this client wants to hold - int wanted() { return wanted_caps; } + int wanted() { return _wanted; } void set_wanted(int w) { - wanted_caps = w; + check_rdcaps_list(_pending, _pending, _wanted, w); + _wanted = w; } capseq_t get_last_seq() { return last_sent; } + void check_rdcaps_list(int o, int n, int ow, int nw) + { + bool wastrimmable = rdcaps_item.is_on_xlist();//(o & ~CEPH_CAP_EXPIREABLE) == 0 && ow == 0; + bool istrimmable = (n & ~CEPH_CAP_EXPIREABLE) == 0 && nw == 0; + + if (!wastrimmable && istrimmable) + rdcaps_list->push_back(&rdcaps_item); + else if (wastrimmable && !istrimmable) + rdcaps_item.remove_myself(); + } + + + // -- exports -- Export make_export() { - return Export(wanted_caps, issued(), pending(), client_follows, mseq+1, last_issue_stamp); + return Export(_wanted, issued(), pending(), client_follows, mseq+1, last_issue_stamp); } void merge(Export& other) { // issued + pending @@ -265,7 +284,7 @@ public: client_follows = other.client_follows; // wanted - wanted_caps = wanted_caps | other.wanted; + _wanted = _wanted | other.wanted; mseq = other.mseq; } void merge(int otherwanted, int otherissued) { @@ -276,7 +295,7 @@ public: issue(newpending); // wanted - wanted_caps = wanted_caps | otherwanted; + _wanted = _wanted | otherwanted; } void revoke() { @@ -287,10 +306,10 @@ public: // serializers void encode(bufferlist &bl) const { - ::encode(wanted_caps, bl); ::encode(last_sent, bl); ::encode(last_issue_stamp, bl); + ::encode(_wanted, bl); ::encode(_pending, bl); ::encode(_issued, bl); ::encode(_num_revoke, bl); @@ -298,10 +317,10 @@ public: ::encode_array_nohead(_revoke_seq, _num_revoke, bl); } void decode(bufferlist::iterator &bl) { - ::decode(wanted_caps, bl); ::decode(last_sent, bl); ::decode(last_issue_stamp, bl); + ::decode(_wanted, bl); ::decode(_pending, bl); ::decode(_issued, bl); ::decode(_num_revoke, bl); diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index c0caf53f3d3a5..0181b451a4ae1 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -542,8 +542,7 @@ Capability* Locker::issue_new_caps(CInode *in, Capability *cap = in->get_client_cap(my_client); if (!cap) { // new cap - cap = in->add_client_cap(my_client, realm); - session->touch_cap(cap); + cap = in->add_client_cap(my_client, session, &mdcache->client_rdcaps, realm); cap->set_wanted(my_want); cap->inc_suppress(); // suppress file cap messages for new cap (we'll bundle with the open() reply) is_new = true; diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index c9016fbf962e6..2859b92a6d764 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -1008,7 +1008,8 @@ CInode *MDCache::cow_inode(CInode *in, snapid_t last) cap->client_follows < last) { // clone to oldin int client = p->first; - Capability *newcap = oldin->add_client_cap(client, in->containing_realm); + Capability *newcap = oldin->add_client_cap(client, 0, &client_rdcaps, in->containing_realm); + cap->session_caps_item.get_xlist()->push_back(&newcap->session_caps_item); newcap->issue(cap->issued()); newcap->set_last_issue_stamp(cap->get_last_issue_stamp()); newcap->client_follows = cap->client_follows; @@ -3629,8 +3630,7 @@ void MDCache::rejoin_import_cap(CInode *in, int client, ceph_mds_cap_reconnect& assert(session); // add cap - Capability *cap = in->reconnect_cap(client, icr); - session->touch_cap(cap); + Capability *cap = in->reconnect_cap(client, icr, session, &client_rdcaps); do_cap_import(session, in, cap); } @@ -4790,6 +4790,42 @@ void MDCache::trim_client_leases() } +void MDCache::trim_client_rdcaps() +{ + utime_t cutoff = g_clock.now(); + cutoff -= g_conf.mds_rdcap_ttl_ms / 1000.0; + + dout(10) << "trim_client_rdcaps" << dendl; + + xlist::iterator p = client_rdcaps.begin(); + while (!p.end()) { + Capability *cap = *p; + ++p; + + CInode *in = cap->get_inode(); + int client = cap->get_client(); + + if (cap->get_last_issue_stamp() == utime_t()) { + dout(20) << " skipping client" << client + << " stamp " << cap->get_last_issue_stamp() + << " on " << *in << dendl; + continue; + } + if (cap->get_last_issue_stamp() > cutoff) { + dout(20) << " stopping at client" << client + << " stamp " << cap->get_last_issue_stamp() << " > cutoff " << cutoff + << " on " << *in << dendl; + break; + } + + dout(10) << " expiring client" << client + << " issued " << ccap_string(cap->issued()) + << " wanted " << ccap_string(cap->wanted()) + << " on " << *in << dendl; + in->remove_client_cap(client); + } +} + // ========================================================================================= // shutdown diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h index 056f61972f764..3600a6a578064 100644 --- a/src/mds/MDCache.h +++ b/src/mds/MDCache.h @@ -410,6 +410,13 @@ public: r->ttl = ttl; } + void trim_client_leases(); + + // -- client caps -- + xlist client_rdcaps; + + void trim_client_rdcaps(); + // -- discover -- // waiters @@ -743,8 +750,6 @@ public: void send_expire_messages(map& expiremap); void trim_non_auth(); // trim out trimmable non-auth items - void trim_client_leases(); - // shutdown void shutdown_start(); void shutdown_check(); diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index 5689692e94dda..7232030bc2a55 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -1281,6 +1281,7 @@ bool MDS::_dispatch(Message *m) // trim cache mdcache->trim(); mdcache->trim_client_leases(); + mdcache->trim_client_rdcaps(); } diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 16c4f461c092c..287cbd3616ce1 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -2048,8 +2048,7 @@ void Migrator::finish_import_inode_caps(CInode *in, int from, Capability *cap = in->get_client_cap(it->first); if (!cap) { - cap = in->add_client_cap(it->first); - session->touch_cap(cap); + cap = in->add_client_cap(it->first, session, &mds->mdcache->client_rdcaps); } cap->merge(it->second); diff --git a/src/mds/Server.cc b/src/mds/Server.cc index ccaaab7717eeb..c2409119380d9 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -425,8 +425,7 @@ void Server::handle_client_reconnect(MClientReconnect *m) // we recovered it, and it's ours. take note. dout(15) << "open cap realm " << inodeno_t(p->second.capinfo.snaprealm) << " on " << *in << dendl; - Capability *cap = in->reconnect_cap(from, p->second.capinfo); - session->touch_cap(cap); + in->reconnect_cap(from, p->second.capinfo, session, &mdcache->client_rdcaps); mds->mdcache->add_reconnected_cap(in, from, inodeno_t(p->second.capinfo.snaprealm)); continue; } diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h index e5e230a3dc165..69b518f529849 100644 --- a/src/mds/SessionMap.h +++ b/src/mds/SessionMap.h @@ -29,6 +29,7 @@ class CInode; #include "Capability.h" + /* * session */ @@ -100,7 +101,7 @@ public: version_t inc_push_seq() { return ++cap_push_seq; } version_t get_push_seq() const { return cap_push_seq; } - void touch_cap(Capability *cap) { + void add_cap(Capability *cap) { caps.push_back(&cap->session_caps_item); } void touch_lease(ClientLease *r) { -- 2.39.5