History

ceph: pass the mdsc to several helpers

We will use the 'mdsc' to get the global_id in the following commits.

Xiubo Li committed 3 years ago

Commit 197b7d71 parent 5c5f0d210 files · +55 −37Browse files

Unified · Split

10 files
  1. fs/ceph/caps.c +9 −6
  2. fs/ceph/debugfs.c +2 −2
  3. fs/ceph/dir.c +1 −1
  4. fs/ceph/file.c +1 −1
  5. fs/ceph/mds_client.c +22 −17
  6. fs/ceph/mds_client.h +2 −1
  7. fs/ceph/mdsmap.c +2 −1
  8. fs/ceph/snap.c +10 −6
  9. fs/ceph/super.h +2 −1
  10. include/linux/ceph/mdsmap.h +4 −1
fs/ceph/caps.c+9−6
@@ -1178,7 +1178,8 @@ void __ceph_remove_cap(struct ceph_cap *cap, bool queue_release) · 1177 unmodified lines
1178 }1178 }
1179}1179}
1180 1180
1181void ceph_remove_cap(struct ceph_cap *cap, bool queue_release)1181void ceph_remove_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
1182 bool queue_release)
1182{1183{
1183 struct ceph_inode_info *ci = cap->ci;1184 struct ceph_inode_info *ci = cap->ci;
1184 struct ceph_fs_client *fsc;1185 struct ceph_fs_client *fsc;
@@ -1342,6 +1343,8 @@ static void encode_cap_msg(struct ceph_msg *msg, struct cap_msg_args *arg) · 157 unmodified lines
1342 */1343 */
1343void __ceph_remove_caps(struct ceph_inode_info *ci)1344void __ceph_remove_caps(struct ceph_inode_info *ci)
1344{1345{
1346 struct inode *inode = &ci->netfs.inode;
1347 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
1345 struct rb_node *p;1348 struct rb_node *p;
1346 1349
1347 /* lock i_ceph_lock, because ceph_d_revalidate(..., LOOKUP_RCU)1350 /* lock i_ceph_lock, because ceph_d_revalidate(..., LOOKUP_RCU)
@@ -1351,7 +1354,7 @@ void __ceph_remove_caps(struct ceph_inode_info *ci) · 3 unmodified lines
1351 while (p) {1354 while (p) {
1352 struct ceph_cap *cap = rb_entry(p, struct ceph_cap, ci_node);1355 struct ceph_cap *cap = rb_entry(p, struct ceph_cap, ci_node);
1353 p = rb_next(p);1356 p = rb_next(p);
1354 ceph_remove_cap(cap, true);1357 ceph_remove_cap(mdsc, cap, true);
1355 }1358 }
1356 spin_unlock(&ci->i_ceph_lock);1359 spin_unlock(&ci->i_ceph_lock);
1357}1360}
@@ -3999,7 +4002,7 @@ retry: · 2641 unmodified lines
3999 goto out_unlock;4002 goto out_unlock;
4000 4003
4001 if (target < 0) {4004 if (target < 0) {
4002 ceph_remove_cap(cap, false);4005 ceph_remove_cap(mdsc, cap, false);
4003 goto out_unlock;4006 goto out_unlock;
4004 }4007 }
4005 4008
@@ -4034,7 +4037,7 @@ retry: · 28 unmodified lines
4034 change_auth_cap_ses(ci, tcap->session);4037 change_auth_cap_ses(ci, tcap->session);
4035 }4038 }
4036 }4039 }
4037 ceph_remove_cap(cap, false);4040 ceph_remove_cap(mdsc, cap, false);
4038 goto out_unlock;4041 goto out_unlock;
4039 } else if (tsession) {4042 } else if (tsession) {
4040 /* add placeholder for the export tagert */4043 /* add placeholder for the export tagert */
@@ -4051,7 +4054,7 @@ retry: · 10 unmodified lines
4051 spin_unlock(&mdsc->cap_dirty_lock);4054 spin_unlock(&mdsc->cap_dirty_lock);
4052 }4055 }
4053 4056
4054 ceph_remove_cap(cap, false);4057 ceph_remove_cap(mdsc, cap, false);
4055 goto out_unlock;4058 goto out_unlock;
4056 }4059 }
4057 4060
@@ -4164,7 +4167,7 @@ retry: · 106 unmodified lines
4164 ocap->mseq, mds, le32_to_cpu(ph->seq),4167 ocap->mseq, mds, le32_to_cpu(ph->seq),
4165 le32_to_cpu(ph->mseq));4168 le32_to_cpu(ph->mseq));
4166 }4169 }
4167 ceph_remove_cap(ocap, (ph->flags & CEPH_CAP_FLAG_RELEASE));4170 ceph_remove_cap(mdsc, ocap, (ph->flags & CEPH_CAP_FLAG_RELEASE));
4168 }4171 }
4169 4172
4170 *old_issued = issued;4173 *old_issued = issued;
fs/ceph/debugfs.c+2−2
@@ -81,7 +81,7 @@ static int mdsc_show(struct seq_file *s, void *p) · 80 unmodified lines
81 if (req->r_inode) {81 if (req->r_inode) {
82 seq_printf(s, " #%llx", ceph_ino(req->r_inode));82 seq_printf(s, " #%llx", ceph_ino(req->r_inode));
83 } else if (req->r_dentry) {83 } else if (req->r_dentry) {
84 path = ceph_mdsc_build_path(req->r_dentry, &pathlen,84 path = ceph_mdsc_build_path(mdsc, req->r_dentry, &pathlen,
85 &pathbase, 0);85 &pathbase, 0);
86 if (IS_ERR(path))86 if (IS_ERR(path))
87 path = NULL;87 path = NULL;
@@ -100,7 +100,7 @@ static int mdsc_show(struct seq_file *s, void *p) · 12 unmodified lines
100 }100 }
101 101
102 if (req->r_old_dentry) {102 if (req->r_old_dentry) {
103 path = ceph_mdsc_build_path(req->r_old_dentry, &pathlen,103 path = ceph_mdsc_build_path(mdsc, req->r_old_dentry, &pathlen,
104 &pathbase, 0);104 &pathbase, 0);
105 if (IS_ERR(path))105 if (IS_ERR(path))
106 path = NULL;106 path = NULL;
fs/ceph/dir.c+1−1
@@ -1226,7 +1226,7 @@ static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc, · 1225 unmodified lines
1226 if (result) {1226 if (result) {
1227 int pathlen = 0;1227 int pathlen = 0;
1228 u64 base = 0;1228 u64 base = 0;
1229 char *path = ceph_mdsc_build_path(dentry, &pathlen,1229 char *path = ceph_mdsc_build_path(mdsc, dentry, &pathlen,
1230 &base, 0);1230 &base, 0);
1231 1231
1232 /* mark error on parent + clear complete */1232 /* mark error on parent + clear complete */
fs/ceph/file.c+1−1
@@ -574,7 +574,7 @@ static void ceph_async_create_cb(struct ceph_mds_client *mdsc, · 573 unmodified lines
574 if (result) {574 if (result) {
575 int pathlen = 0;575 int pathlen = 0;
576 u64 base = 0;576 u64 base = 0;
577 char *path = ceph_mdsc_build_path(req->r_dentry, &pathlen,577 char *path = ceph_mdsc_build_path(mdsc, req->r_dentry, &pathlen,
578 &base, 0);578 &base, 0);
579 579
580 pr_warn("async create failure path=(%llx)%s result=%d!\n",580 pr_warn("async create failure path=(%llx)%s result=%d!\n",
fs/ceph/mds_client.c+22−17
@@ -2126,6 +2126,7 @@ out: · 2125 unmodified lines
2126 */2126 */
2127static int trim_caps_cb(struct inode *inode, int mds, void *arg)2127static int trim_caps_cb(struct inode *inode, int mds, void *arg)
2128{2128{
2129 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb);
2129 int *remaining = arg;2130 int *remaining = arg;
2130 struct ceph_inode_info *ci = ceph_inode(inode);2131 struct ceph_inode_info *ci = ceph_inode(inode);
2131 int used, wanted, oissued, mine;2132 int used, wanted, oissued, mine;
@@ -2173,7 +2174,7 @@ static int trim_caps_cb(struct inode *inode, int mds, void *arg) · 41 unmodified lines
2173 2174
2174 if (oissued) {2175 if (oissued) {
2175 /* we aren't the only cap.. just remove us */2176 /* we aren't the only cap.. just remove us */
2176 ceph_remove_cap(cap, true);2177 ceph_remove_cap(mdsc, cap, true);
2177 (*remaining)--;2178 (*remaining)--;
2178 } else {2179 } else {
2179 struct dentry *dentry;2180 struct dentry *dentry;
@@ -2588,6 +2589,7 @@ static u8 *get_fscrypt_altname(const struct ceph_mds_request *req, u32 *plen) · 408 unmodified lines
2588 2589
2589/**2590/**
2590 * ceph_mdsc_build_path - build a path string to a given dentry2591 * ceph_mdsc_build_path - build a path string to a given dentry
2592 * @mdsc: mds client
2591 * @dentry: dentry to which path should be built2593 * @dentry: dentry to which path should be built
2592 * @plen: returned length of string2594 * @plen: returned length of string
2593 * @pbase: returned base inode number2595 * @pbase: returned base inode number
@@ -2607,8 +2609,8 @@ static u8 *get_fscrypt_altname(const struct ceph_mds_request *req, u32 *plen) · 13 unmodified lines
2607 * Encode hidden .snap dirs as a double /, i.e.2609 * Encode hidden .snap dirs as a double /, i.e.
2608 * foo/.snap/bar -> foo//bar2610 * foo/.snap/bar -> foo//bar
2609 */2611 */
2610char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *pbase,2612char *ceph_mdsc_build_path(struct ceph_mds_client *mdsc, struct dentry *dentry,
2611 int for_wire)2613 int *plen, u64 *pbase, int for_wire)
2612{2614{
2613 struct dentry *cur;2615 struct dentry *cur;
2614 struct inode *inode;2616 struct inode *inode;
@@ -2726,9 +2728,9 @@ retry: · 111 unmodified lines
2726 return path + pos;2728 return path + pos;
2727}2729}
2728 2730
2729static int build_dentry_path(struct dentry *dentry, struct inode *dir,2731static int build_dentry_path(struct ceph_mds_client *mdsc, struct dentry *dentry,
2730 const char **ppath, int *ppathlen, u64 *pino,2732 struct inode *dir, const char **ppath, int *ppathlen,
2731 bool *pfreepath, bool parent_locked)2733 u64 *pino, bool *pfreepath, bool parent_locked)
2732{2734{
2733 char *path;2735 char *path;
2734 2736
@@ -2744,7 +2746,7 @@ static int build_dentry_path(struct dentry *dentry, struct inode *dir, · 9 unmodified lines
2744 return 0;2746 return 0;
2745 }2747 }
2746 rcu_read_unlock();2748 rcu_read_unlock();
2747 path = ceph_mdsc_build_path(dentry, ppathlen, pino, 1);2749 path = ceph_mdsc_build_path(mdsc, dentry, ppathlen, pino, 1);
2748 if (IS_ERR(path))2750 if (IS_ERR(path))
2749 return PTR_ERR(path);2751 return PTR_ERR(path);
2750 *ppath = path;2752 *ppath = path;
@@ -2756,6 +2758,7 @@ static int build_inode_path(struct inode *inode, · 5 unmodified lines
2756 const char **ppath, int *ppathlen, u64 *pino,2758 const char **ppath, int *ppathlen, u64 *pino,
2757 bool *pfreepath)2759 bool *pfreepath)
2758{2760{
2761 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb);
2759 struct dentry *dentry;2762 struct dentry *dentry;
2760 char *path;2763 char *path;
2761 2764
@@ -2765,7 +2768,7 @@ static int build_inode_path(struct inode *inode, · 3 unmodified lines
2765 return 0;2768 return 0;
2766 }2769 }
2767 dentry = d_find_alias(inode);2770 dentry = d_find_alias(inode);
2768 path = ceph_mdsc_build_path(dentry, ppathlen, pino, 1);2771 path = ceph_mdsc_build_path(mdsc, dentry, ppathlen, pino, 1);
2769 dput(dentry);2772 dput(dentry);
2770 if (IS_ERR(path))2773 if (IS_ERR(path))
2771 return PTR_ERR(path);2774 return PTR_ERR(path);
@@ -2778,10 +2781,11 @@ static int build_inode_path(struct inode *inode, · 6 unmodified lines
2778 * request arguments may be specified via an inode *, a dentry *, or2781 * request arguments may be specified via an inode *, a dentry *, or
2779 * an explicit ino+path.2782 * an explicit ino+path.
2780 */2783 */
2781static int set_request_path_attr(struct inode *rinode, struct dentry *rdentry,2784static int set_request_path_attr(struct ceph_mds_client *mdsc, struct inode *rinode,
2782 struct inode *rdiri, const char *rpath,2785 struct dentry *rdentry, struct inode *rdiri,
2783 u64 rino, const char **ppath, int *pathlen,2786 const char *rpath, u64 rino, const char **ppath,
2784 u64 *ino, bool *freepath, bool parent_locked)2787 int *pathlen, u64 *ino, bool *freepath,
2788 bool parent_locked)
2785{2789{
2786 int r = 0;2790 int r = 0;
2787 2791
@@ -2790,7 +2794,7 @@ static int set_request_path_attr(struct inode *rinode, struct dentry *rdentry, · 2 unmodified lines
2790 dout(" inode %p %llx.%llx\n", rinode, ceph_ino(rinode),2794 dout(" inode %p %llx.%llx\n", rinode, ceph_ino(rinode),
2791 ceph_snap(rinode));2795 ceph_snap(rinode));
2792 } else if (rdentry) {2796 } else if (rdentry) {
2793 r = build_dentry_path(rdentry, rdiri, ppath, pathlen, ino,2797 r = build_dentry_path(mdsc, rdentry, rdiri, ppath, pathlen, ino,
2794 freepath, parent_locked);2798 freepath, parent_locked);
2795 dout(" dentry %p %llx/%.*s\n", rdentry, *ino, *pathlen,2799 dout(" dentry %p %llx/%.*s\n", rdentry, *ino, *pathlen,
2796 *ppath);2800 *ppath);
@@ -2877,7 +2881,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_session *session, · 80 unmodified lines
2877 bool old_version = !test_bit(CEPHFS_FEATURE_32BITS_RETRY_FWD,2881 bool old_version = !test_bit(CEPHFS_FEATURE_32BITS_RETRY_FWD,
2878 &session->s_features);2882 &session->s_features);
2879 2883
2880 ret = set_request_path_attr(req->r_inode, req->r_dentry,2884 ret = set_request_path_attr(mdsc, req->r_inode, req->r_dentry,
2881 req->r_parent, req->r_path1, req->r_ino1.ino,2885 req->r_parent, req->r_path1, req->r_ino1.ino,
2882 &path1, &pathlen1, &ino1, &freepath1,2886 &path1, &pathlen1, &ino1, &freepath1,
2883 test_bit(CEPH_MDS_R_PARENT_LOCKED,2887 test_bit(CEPH_MDS_R_PARENT_LOCKED,
@@ -2891,7 +2895,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_session *session, · 7 unmodified lines
2891 if (req->r_old_dentry &&2895 if (req->r_old_dentry &&
2892 !(req->r_old_dentry->d_flags & DCACHE_DISCONNECTED))2896 !(req->r_old_dentry->d_flags & DCACHE_DISCONNECTED))
2893 old_dentry = req->r_old_dentry;2897 old_dentry = req->r_old_dentry;
2894 ret = set_request_path_attr(NULL, old_dentry,2898 ret = set_request_path_attr(mdsc, NULL, old_dentry,
2895 req->r_old_dentry_dir,2899 req->r_old_dentry_dir,
2896 req->r_path2, req->r_ino2.ino,2900 req->r_path2, req->r_ino2.ino,
2897 &path2, &pathlen2, &ino2, &freepath2, true);2901 &path2, &pathlen2, &ino2, &freepath2, true);
@@ -4290,6 +4294,7 @@ out_unlock: · 1392 unmodified lines
4290 */4294 */
4291static int reconnect_caps_cb(struct inode *inode, int mds, void *arg)4295static int reconnect_caps_cb(struct inode *inode, int mds, void *arg)
4292{4296{
4297 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb);
4293 union {4298 union {
4294 struct ceph_mds_cap_reconnect v2;4299 struct ceph_mds_cap_reconnect v2;
4295 struct ceph_mds_cap_reconnect_v1 v1;4300 struct ceph_mds_cap_reconnect_v1 v1;
@@ -4307,7 +4312,7 @@ static int reconnect_caps_cb(struct inode *inode, int mds, void *arg) · 11 unmodified lines
4307 dentry = d_find_primary(inode);4312 dentry = d_find_primary(inode);
4308 if (dentry) {4313 if (dentry) {
4309 /* set pathbase to parent dir when msg_version >= 2 */4314 /* set pathbase to parent dir when msg_version >= 2 */
4310 path = ceph_mdsc_build_path(dentry, &pathlen, &pathbase,4315 path = ceph_mdsc_build_path(mdsc, dentry, &pathlen, &pathbase,
4311 recon_state->msg_version >= 2);4316 recon_state->msg_version >= 2);
4312 dput(dentry);4317 dput(dentry);
4313 if (IS_ERR(path)) {4318 if (IS_ERR(path)) {
@@ -5662,7 +5667,7 @@ void ceph_mdsc_handle_mdsmap(struct ceph_mds_client *mdsc, struct ceph_msg *msg) · 1348 unmodified lines
5662 return;5667 return;
5663 }5668 }
5664 5669
5665 newmap = ceph_mdsmap_decode(&p, end, ceph_msgr2(mdsc->fsc->client));5670 newmap = ceph_mdsmap_decode(mdsc, &p, end, ceph_msgr2(mdsc->fsc->client));
5666 if (IS_ERR(newmap)) {5671 if (IS_ERR(newmap)) {
5667 err = PTR_ERR(newmap);5672 err = PTR_ERR(newmap);
5668 goto bad_unlock;5673 goto bad_unlock;
fs/ceph/mds_client.h+2−1
@@ -581,7 +581,8 @@ static inline void ceph_mdsc_free_path(char *path, int len) · 580 unmodified lines
581 __putname(path - (PATH_MAX - 1 - len));581 __putname(path - (PATH_MAX - 1 - len));
582}582}
583 583
584extern char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *base,584extern char *ceph_mdsc_build_path(struct ceph_mds_client *mdsc,
585 struct dentry *dentry, int *plen, u64 *base,
585 int for_wire);586 int for_wire);
586 587
587extern void __ceph_mdsc_drop_dentry_lease(struct dentry *dentry);588extern void __ceph_mdsc_drop_dentry_lease(struct dentry *dentry);
fs/ceph/mdsmap.c+2−1
@@ -114,7 +114,8 @@ bad: · 113 unmodified lines
114 * Ignore any fields we don't care about (there are quite a few of114 * Ignore any fields we don't care about (there are quite a few of
115 * them).115 * them).
116 */116 */
117struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end, bool msgr2)117struct ceph_mdsmap *ceph_mdsmap_decode(struct ceph_mds_client *mdsc, void **p,
118 void *end, bool msgr2)
118{119{
119 struct ceph_mdsmap *m;120 struct ceph_mdsmap *m;
120 const void *start = *p;121 const void *start = *p;
fs/ceph/snap.c+10−6
@@ -329,7 +329,8 @@ static int cmpu64_rev(const void *a, const void *b) · 328 unmodified lines
329/*329/*
330 * build the snap context for a given realm.330 * build the snap context for a given realm.
331 */331 */
332static int build_snap_context(struct ceph_snap_realm *realm,332static int build_snap_context(struct ceph_mds_client *mdsc,
333 struct ceph_snap_realm *realm,
333 struct list_head *realm_queue,334 struct list_head *realm_queue,
334 struct list_head *dirty_realms)335 struct list_head *dirty_realms)
335{336{
@@ -425,7 +426,8 @@ fail: · 89 unmodified lines
425/*426/*
426 * rebuild snap context for the given realm and all of its children.427 * rebuild snap context for the given realm and all of its children.
427 */428 */
428static void rebuild_snap_realms(struct ceph_snap_realm *realm,429static void rebuild_snap_realms(struct ceph_mds_client *mdsc,
430 struct ceph_snap_realm *realm,
429 struct list_head *dirty_realms)431 struct list_head *dirty_realms)
430{432{
431 LIST_HEAD(realm_queue);433 LIST_HEAD(realm_queue);
@@ -451,7 +453,8 @@ static void rebuild_snap_realms(struct ceph_snap_realm *realm, · 19 unmodified lines
451 continue;453 continue;
452 }454 }
453 455
454 last = build_snap_context(_realm, &realm_queue, dirty_realms);456 last = build_snap_context(mdsc, _realm, &realm_queue,
457 dirty_realms);
455 dout("%s %llx %p, %s\n", __func__, _realm->ino, _realm,458 dout("%s %llx %p, %s\n", __func__, _realm->ino, _realm,
456 last > 0 ? "is deferred" : !last ? "succeeded" : "failed");459 last > 0 ? "is deferred" : !last ? "succeeded" : "failed");
457 460
@@ -708,7 +711,8 @@ int __ceph_finish_cap_snap(struct ceph_inode_info *ci, · 250 unmodified lines
708 * Queue cap_snaps for snap writeback for this realm and its children.711 * Queue cap_snaps for snap writeback for this realm and its children.
709 * Called under snap_rwsem, so realm topology won't change.712 * Called under snap_rwsem, so realm topology won't change.
710 */713 */
711static void queue_realm_cap_snaps(struct ceph_snap_realm *realm)714static void queue_realm_cap_snaps(struct ceph_mds_client *mdsc,
715 struct ceph_snap_realm *realm)
712{716{
713 struct ceph_inode_info *ci;717 struct ceph_inode_info *ci;
714 struct inode *lastinode = NULL;718 struct inode *lastinode = NULL;
@@ -855,7 +859,7 @@ more: · 140 unmodified lines
855 859
856 /* rebuild_snapcs when we reach the _end_ (root) of the trace */860 /* rebuild_snapcs when we reach the _end_ (root) of the trace */
857 if (realm_to_rebuild && p >= e)861 if (realm_to_rebuild && p >= e)
858 rebuild_snap_realms(realm_to_rebuild, &dirty_realms);862 rebuild_snap_realms(mdsc, realm_to_rebuild, &dirty_realms);
859 863
860 if (!first_realm)864 if (!first_realm)
861 first_realm = realm;865 first_realm = realm;
@@ -873,7 +877,7 @@ more: · 11 unmodified lines
873 realm = list_first_entry(&dirty_realms, struct ceph_snap_realm,877 realm = list_first_entry(&dirty_realms, struct ceph_snap_realm,
874 dirty_item);878 dirty_item);
875 list_del_init(&realm->dirty_item);879 list_del_init(&realm->dirty_item);
876 queue_realm_cap_snaps(realm);880 queue_realm_cap_snaps(mdsc, realm);
877 }881 }
878 882
879 if (realm_ret)883 if (realm_ret)
fs/ceph/super.h+2−1
@@ -1223,7 +1223,8 @@ extern void ceph_add_cap(struct inode *inode, · 1222 unmodified lines
1223 unsigned cap, unsigned seq, u64 realmino, int flags,1223 unsigned cap, unsigned seq, u64 realmino, int flags,
1224 struct ceph_cap **new_cap);1224 struct ceph_cap **new_cap);
1225extern void __ceph_remove_cap(struct ceph_cap *cap, bool queue_release);1225extern void __ceph_remove_cap(struct ceph_cap *cap, bool queue_release);
1226extern void ceph_remove_cap(struct ceph_cap *cap, bool queue_release);1226extern void ceph_remove_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
1227 bool queue_release);
1227extern void __ceph_remove_caps(struct ceph_inode_info *ci);1228extern void __ceph_remove_caps(struct ceph_inode_info *ci);
1228extern void ceph_put_cap(struct ceph_mds_client *mdsc,1229extern void ceph_put_cap(struct ceph_mds_client *mdsc,
1229 struct ceph_cap *cap);1230 struct ceph_cap *cap);
include/linux/ceph/mdsmap.h+4−1
@@ -5,6 +5,8 @@ · 4 unmodified lines
5#include <linux/bug.h>5#include <linux/bug.h>
6#include <linux/ceph/types.h>6#include <linux/ceph/types.h>
7 7
8struct ceph_mds_client;
9
8/*10/*
9 * mds map - describe servers in the mds cluster.11 * mds map - describe servers in the mds cluster.
10 *12 *
@@ -65,7 +67,8 @@ static inline bool ceph_mdsmap_is_laggy(struct ceph_mdsmap *m, int w) · 54 unmodified lines
65}67}
66 68
67extern int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m);69extern int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m);
68struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end, bool msgr2);70struct ceph_mdsmap *ceph_mdsmap_decode(struct ceph_mds_client *mdsc, void **p,
71 void *end, bool msgr2);
69extern void ceph_mdsmap_destroy(struct ceph_mdsmap *m);72extern void ceph_mdsmap_destroy(struct ceph_mdsmap *m);
70extern bool ceph_mdsmap_is_cluster_available(struct ceph_mdsmap *m);73extern bool ceph_mdsmap_is_cluster_available(struct ceph_mdsmap *m);
71 74