Lines Matching refs:mds

431  * Find ceph_cap for given mds, if any.
435 struct ceph_cap *__get_cap_for_mds(struct ceph_inode_info *ci, int mds)
442 if (mds < cap->mds)
444 else if (mds > cap->mds)
452 struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci, int mds)
457 cap = __get_cap_for_mds(ci, mds);
475 if (new->mds < cap->mds)
477 else if (new->mds > cap->mds)
641 int mds = session->s_mds;
647 dout("add_cap %p mds%d cap %llx %s seq %d\n", inode,
652 cap = __get_cap_for_mds(ci, mds);
659 cap->mds = mds;
682 * auth mds of the inode changed. we received the cap export
719 * If we are issued caps we don't want, or the mds' wanted
721 * later and/or update the mds wanted value.
726 dout(" issued %s, mds wanted %s, actual %s, queueing\n",
745 dout("add_cap inode %p (%llx.%llx) cap %p %s now %s seq %d mds%d\n",
747 ceph_cap_string(issued|cap->issued), seq, mds);
765 * us losing touch with the mds).
850 dout("__touch_cap %p cap %p mds%d\n", &cap->ci->netfs.inode, cap,
854 dout("__touch_cap %p cap %p mds%d NOP, iterating over caps\n",
1307 /* pool namespace (version 8) (mds always ignores this) */
1364 * Make note of max_size reported/requested from mds, revoked caps
1647 dout("__flush_snaps %p auth cap %p not mds%d, "
1692 int mds;
1708 mds = ci->i_auth_cap->session->s_mds;
1709 if (session && session->s_mds != mds) {
1717 session = __ceph_lookup_mds_session(mdsc, mds);
1948 /* mds will adjust max size according to the reported size */
1962 * versus held caps. Release, flush, ack revoked caps to mds as
1977 int mds = -1; /* keep track of how far we've gone through i_caps list
2039 * because then the mds would revoke it anyway to
2088 if (mds >= cap->mds ||
2101 dout(" mds%d cap %p used %s issued %s implemented %s revoking %s\n",
2102 cap->mds, cap, ceph_cap_string(cap_used),
2158 /* want more caps from mds? */
2202 mds = cap->mds; /* remember mds, so we don't repeat */
2232 * Try to flush dirty caps back to the auth mds.
2451 * only wait on non-file metadata writeback (the mds
2472 * Flush any dirty caps back to the mds. If we aren't asked to wait,
2540 pr_err("%p auth cap %p not mds%d ???\n",
2596 dout("early_kick_flushing_caps mds%d\n", session->s_mds);
2606 pr_err("%p auth cap %p not mds%d ???\n",
2646 dout("kick_flushing_caps mds%d\n", session->s_mds);
2656 pr_err("%p auth cap %p not mds%d ???\n",
2854 dout("get_cap_refs %p need %s but mds%d readonly\n",
2855 inode, ceph_cap_string(need), ci->i_auth_cap->mds);
2962 * ask the mds) so we don't get hung up indefinitely.
3438 dout("handle_cap_grant inode %p cap %p mds%d seq %d %s\n",
3467 * auth mds of the inode changed. we received the cap export message,
3494 pr_warn_once("inode type changed! (ino %llx.%llx is 0%o, mds says 0%o)\n",
3602 * If mds is importing cap, prior cap messages that update
3603 * 'wanted' may get dropped by mds (migrate seq mismatch).
3606 * want are already issued. If mds revokes caps, cap message
3607 * that releases caps also tells mds what we want. But if
3608 * caps got revoked by mds forcedly (session stale). We may
3609 * haven't told mds what we want.
3768 dout("handle_cap_flush_ack inode %p mds%d seq %d on %s cleaned %s,"
3788 dout(" mds%d still flushing cap on %p\n",
3887 dout("handle_cap_flushsnap_ack inode %p ci %p mds%d follows %lld\n",
3932 int mds = session->s_mds;
3954 dout("%s inode %p mds%d seq %d to %lld truncate seq %d\n",
3955 __func__, inode, mds, seq, truncate_size, truncate_seq);
3962 * Handle EXPORT from MDS. Cap is being migrated _from_ this mds to a
3981 int mds = session->s_mds;
3987 target = le32_to_cpu(ph->mds);
3993 dout("handle_cap_export inode %p ci %p mds%d mseq %d target %d\n",
3994 inode, ci, mds, mseq, target);
3998 cap = __get_cap_for_mds(ci, mds);
4015 "ino (%llx.%llx) mds%d seq %d mseq %d "
4017 ceph_vinop(inode), mds, cap->seq, cap->mseq,
4027 dout(" updating import cap %p mds%d\n", tcap, target);
4066 if (mds > target) {
4109 int mds = session->s_mds;
4122 peer = le32_to_cpu(ph->mds);
4128 dout("handle_cap_import inode %p ci %p mds%d mseq %d peer %d\n",
4129 inode, ci, mds, mseq, peer);
4131 cap = __get_cap_for_mds(ci, mds);
4155 dout(" remove export cap %p mds%d flags %d\n",
4162 "mds%d seq %d mseq %d importer mds%d "
4165 ocap->mseq, mds, le32_to_cpu(ph->seq),
4249 dout("handle_caps from mds%d\n", session->s_mds);
4355 dout(" mds%d seq %lld cap seq %u\n", session->s_mds, session->s_seq,
4414 dout(" no cap on %p ino %llx.%llx from mds%d\n",
4477 * along for the mds (who clearly thinks we still have this
4548 * Flush all dirty caps to the mds
4685 * Helpers for embedding cap and dentry lease releases into mds
4693 int mds, int drop, int unless, int force)
4705 dout("encode_inode_release %p mds%d used|dirty %s drop %s unless %s\n",
4706 inode, mds, ceph_cap_string(used|dirty), ceph_cap_string(drop),
4712 cap = __get_cap_for_mds(ci, mds);
4773 * @mds: mds that we're speaking to
4782 int mds, int drop, int unless)
4795 * doesn't have to be perfect; the mds will revoke anything we don't
4799 if (di->lease_session && di->lease_session->s_mds == mds)
4803 ret = ceph_encode_inode_release(p, dir, mds, drop, unless, force);
4806 if (ret && di->lease_session && di->lease_session->s_mds == mds) {
4807 dout("encode_dentry_release %p mds%d seq %d\n",
4808 dentry, mds, (int)di->lease_seq);