Home
last modified time | relevance | path

Searched refs:mdsc (Results 1 – 16 of 16) sorted by relevance

/linux-4.19.296/fs/ceph/
Dmds_client.c54 static void __wake_requests(struct ceph_mds_client *mdsc,
426 struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, in __ceph_lookup_mds_session() argument
431 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __ceph_lookup_mds_session()
433 session = mdsc->sessions[mds]; in __ceph_lookup_mds_session()
440 static bool __have_session(struct ceph_mds_client *mdsc, int mds) in __have_session() argument
442 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __have_session()
448 static int __verify_registered_session(struct ceph_mds_client *mdsc, in __verify_registered_session() argument
451 if (s->s_mds >= mdsc->max_sessions || in __verify_registered_session()
452 mdsc->sessions[s->s_mds] != s) in __verify_registered_session()
461 static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, in register_session() argument
[all …]
Dquota.c28 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; in ceph_adjust_quota_realms_count() local
30 atomic64_inc(&mdsc->quotarealms_count); in ceph_adjust_quota_realms_count()
32 atomic64_dec(&mdsc->quotarealms_count); in ceph_adjust_quota_realms_count()
37 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; in ceph_has_realms_with_quotas() local
38 return atomic64_read(&mdsc->quotarealms_count) > 0; in ceph_has_realms_with_quotas()
41 void ceph_handle_quota(struct ceph_mds_client *mdsc, in ceph_handle_quota() argument
45 struct super_block *sb = mdsc->fsc->sb; in ceph_handle_quota()
93 static struct ceph_snap_realm *get_quota_realm(struct ceph_mds_client *mdsc, in get_quota_realm() argument
106 ceph_get_snap_realm(mdsc, realm); in get_quota_realm()
125 ceph_get_snap_realm(mdsc, next); in get_quota_realm()
[all …]
Dsnap.c63 void ceph_get_snap_realm(struct ceph_mds_client *mdsc, in ceph_get_snap_realm() argument
75 spin_lock(&mdsc->snap_empty_lock); in ceph_get_snap_realm()
77 spin_unlock(&mdsc->snap_empty_lock); in ceph_get_snap_realm()
109 struct ceph_mds_client *mdsc, in ceph_create_snap_realm() argument
126 __insert_snap_realm(&mdsc->snap_realms, realm); in ceph_create_snap_realm()
136 static struct ceph_snap_realm *__lookup_snap_realm(struct ceph_mds_client *mdsc, in __lookup_snap_realm() argument
139 struct rb_node *n = mdsc->snap_realms.rb_node; in __lookup_snap_realm()
156 struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc, in ceph_lookup_snap_realm() argument
160 r = __lookup_snap_realm(mdsc, ino); in ceph_lookup_snap_realm()
162 ceph_get_snap_realm(mdsc, r); in ceph_lookup_snap_realm()
[all …]
Dcaps.c44 static u64 __get_oldest_flush_tid(struct ceph_mds_client *mdsc);
45 static void __kick_flushing_caps(struct ceph_mds_client *mdsc,
126 void ceph_caps_init(struct ceph_mds_client *mdsc) in ceph_caps_init() argument
128 INIT_LIST_HEAD(&mdsc->caps_list); in ceph_caps_init()
129 spin_lock_init(&mdsc->caps_list_lock); in ceph_caps_init()
132 void ceph_caps_finalize(struct ceph_mds_client *mdsc) in ceph_caps_finalize() argument
136 spin_lock(&mdsc->caps_list_lock); in ceph_caps_finalize()
137 while (!list_empty(&mdsc->caps_list)) { in ceph_caps_finalize()
138 cap = list_first_entry(&mdsc->caps_list, in ceph_caps_finalize()
143 mdsc->caps_total_count = 0; in ceph_caps_finalize()
[all …]
Ddebugfs.c28 if (!fsc->mdsc || !fsc->mdsc->mdsmap) in mdsmap_show()
30 mdsmap = fsc->mdsc->mdsmap; in mdsmap_show()
52 struct ceph_mds_client *mdsc = fsc->mdsc; in mdsc_show() local
59 mutex_lock(&mdsc->mutex); in mdsc_show()
60 for (rp = rb_first(&mdsc->request_tree); rp; rp = rb_next(rp)) { in mdsc_show()
122 mutex_unlock(&mdsc->mutex); in mdsc_show()
145 struct ceph_mds_client *mdsc = fsc->mdsc; in dentry_lru_show() local
148 spin_lock(&mdsc->dentry_lru_lock); in dentry_lru_show()
149 list_for_each_entry(di, &mdsc->dentry_lru, lru) { in dentry_lru_show()
154 spin_unlock(&mdsc->dentry_lru_lock); in dentry_lru_show()
[all …]
Dmds_client.h200 typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc,
205 typedef int (*ceph_mds_request_wait_callback_t) (struct ceph_mds_client *mdsc,
409 extern int ceph_send_msg_mds(struct ceph_mds_client *mdsc,
413 extern void ceph_mdsc_close_sessions(struct ceph_mds_client *mdsc);
414 extern void ceph_mdsc_force_umount(struct ceph_mds_client *mdsc);
417 extern void ceph_mdsc_sync(struct ceph_mds_client *mdsc);
423 ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode);
424 extern void ceph_mdsc_submit_request(struct ceph_mds_client *mdsc,
426 extern int ceph_mdsc_do_request(struct ceph_mds_client *mdsc,
439 extern void ceph_send_cap_releases(struct ceph_mds_client *mdsc,
[all …]
Dexport.c64 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __fh_to_dentry() local
76 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, in __fh_to_dentry()
88 err = ceph_mdsc_do_request(mdsc, NULL, req); in __fh_to_dentry()
126 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __get_parent() local
132 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPPARENT, in __get_parent()
153 err = ceph_mdsc_do_request(mdsc, NULL, req); in __get_parent()
205 struct ceph_mds_client *mdsc; in ceph_get_name() local
209 mdsc = ceph_inode_to_client(d_inode(child))->mdsc; in ceph_get_name()
210 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPNAME, in ceph_get_name()
223 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_get_name()
Dioctl.c37 static long __validate_layout(struct ceph_mds_client *mdsc, in __validate_layout() argument
50 mutex_lock(&mdsc->mutex); in __validate_layout()
52 for (i = 0; i < mdsc->mdsmap->m_num_data_pg_pools; i++) in __validate_layout()
53 if (mdsc->mdsmap->m_data_pg_pools[i] == l->data_pool) { in __validate_layout()
57 mutex_unlock(&mdsc->mutex); in __validate_layout()
67 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_ioctl_set_layout() local
103 err = __validate_layout(mdsc, &nl); in ceph_ioctl_set_layout()
107 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETLAYOUT, in ceph_ioctl_set_layout()
125 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_ioctl_set_layout()
142 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_ioctl_set_layout_policy() local
[all …]
Ddir.c305 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local
376 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_readdir()
413 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir()
733 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_lookup() local
770 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
783 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
822 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_mknod() local
841 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod()
858 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
881 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_symlink() local
[all …]
Dsuper.h103 struct ceph_mds_client *mdsc; member
659 extern void ceph_caps_init(struct ceph_mds_client *mdsc);
660 extern void ceph_caps_finalize(struct ceph_mds_client *mdsc);
661 extern void ceph_adjust_min_caps(struct ceph_mds_client *mdsc, int delta);
662 extern int ceph_reserve_caps(struct ceph_mds_client *mdsc,
664 extern void ceph_unreserve_caps(struct ceph_mds_client *mdsc,
825 struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc,
827 extern void ceph_get_snap_realm(struct ceph_mds_client *mdsc,
829 extern void ceph_put_snap_realm(struct ceph_mds_client *mdsc,
834 extern void ceph_handle_snap(struct ceph_mds_client *mdsc,
[all …]
Dlocks.c13 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc,
62 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_lock_message() local
82 req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); in ceph_lock_message()
113 err = ceph_mdsc_do_request(mdsc, inode, req); in ceph_lock_message()
140 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, in ceph_lock_wait_for_completion() argument
163 mutex_lock(&mdsc->mutex); in ceph_lock_wait_for_completion()
182 mutex_unlock(&mdsc->mutex); in ceph_lock_wait_for_completion()
186 intr_req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETFILELOCK, in ceph_lock_wait_for_completion()
199 err = ceph_mdsc_do_request(mdsc, inode, intr_req); in ceph_lock_wait_for_completion()
Dsuper.c42 ceph_mdsc_close_sessions(fsc->mdsc); in ceph_put_super()
54 if (fsc->mdsc->mdsmap->m_num_data_pg_pools == 1) { in ceph_statfs()
55 data_pool = fsc->mdsc->mdsmap->m_data_pg_pools[0]; in ceph_statfs()
114 ceph_flush_dirty_caps(fsc->mdsc); in ceph_sync_fs()
121 ceph_mdsc_sync(fsc->mdsc); in ceph_sync_fs()
628 ceph_mdsc_handle_mdsmap(fsc->mdsc, msg); in extra_mon_dispatch()
631 ceph_mdsc_handle_fsmap(fsc->mdsc, msg); in extra_mon_dispatch()
852 ceph_mdsc_force_umount(fsc->mdsc); in ceph_umount_begin()
884 struct ceph_mds_client *mdsc = fsc->mdsc; in open_root_dentry() local
891 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, USE_ANY_MDS); in open_root_dentry()
[all …]
Dxattr.c960 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_sync_setxattr() local
985 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_sync_setxattr()
1010 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_sync_setxattr()
1025 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in __ceph_setxattr() local
1083 if (!down_read_trylock(&mdsc->snap_rwsem)) { in __ceph_setxattr()
1085 down_read(&mdsc->snap_rwsem); in __ceph_setxattr()
1127 up_read(&mdsc->snap_rwsem); in __ceph_setxattr()
1137 up_read(&mdsc->snap_rwsem); in __ceph_setxattr()
Dinode.c554 struct ceph_mds_client *mdsc = in ceph_evict_inode() local
555 ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc; in ceph_evict_inode()
565 ceph_put_snap_realm(mdsc, realm); in ceph_evict_inode()
745 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; in fill_inode() local
768 new_cap = ceph_get_cap(mdsc, caps_reservation); in fill_inode()
1034 ceph_put_cap(mdsc, new_cap); in fill_inode()
1966 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in __ceph_setattr() local
1979 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETATTR, in __ceph_setattr()
1992 if (!down_read_trylock(&mdsc->snap_rwsem)) { in __ceph_setattr()
1994 down_read(&mdsc->snap_rwsem); in __ceph_setattr()
[all …]
Daddr.c1819 struct ceph_mds_client *mdsc = fsc->mdsc; in __ceph_pool_perm_get() local
1827 down_read(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get()
1828 p = &mdsc->pool_perm_tree.rb_node; in __ceph_pool_perm_get()
1849 up_read(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get()
1859 down_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get()
1860 p = &mdsc->pool_perm_tree.rb_node; in __ceph_pool_perm_get()
1884 up_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get()
1968 rb_insert_color(&perm->node, &mdsc->pool_perm_tree); in __ceph_pool_perm_get()
1971 up_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get()
2048 void ceph_pool_perm_destroy(struct ceph_mds_client *mdsc) in ceph_pool_perm_destroy() argument
[all …]
Dfile.c181 struct ceph_mds_client *mdsc = fsc->mdsc; in prepare_open_request() local
189 req = ceph_mdsc_create_request(mdsc, op, want_auth); in prepare_open_request()
283 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_renew_caps() local
324 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_renew_caps()
341 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_open() local
417 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_open()
435 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_atomic_open() local
487 err = ceph_mdsc_do_request(mdsc, (flags & O_CREAT) ? dir : NULL, req); in ceph_atomic_open()