Home
last modified time | relevance | path

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

/linux-6.1.9/fs/ceph/
Dquota.c15 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_adjust_quota_realms_count() local
17 atomic64_inc(&mdsc->quotarealms_count); in ceph_adjust_quota_realms_count()
19 atomic64_dec(&mdsc->quotarealms_count); in ceph_adjust_quota_realms_count()
25 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(sb); in ceph_has_realms_with_quotas() local
28 if (atomic64_read(&mdsc->quotarealms_count) > 0) in ceph_has_realms_with_quotas()
40 void ceph_handle_quota(struct ceph_mds_client *mdsc, in ceph_handle_quota() argument
44 struct super_block *sb = mdsc->fsc->sb; in ceph_handle_quota()
84 find_quotarealm_inode(struct ceph_mds_client *mdsc, u64 ino) in find_quotarealm_inode() argument
89 mutex_lock(&mdsc->quotarealms_inodes_mutex); in find_quotarealm_inode()
90 node = &(mdsc->quotarealms_inodes.rb_node); in find_quotarealm_inode()
[all …]
Dsnap.c65 void ceph_get_snap_realm(struct ceph_mds_client *mdsc, in ceph_get_snap_realm() argument
68 lockdep_assert_held(&mdsc->snap_rwsem); in ceph_get_snap_realm()
79 spin_lock(&mdsc->snap_empty_lock); in ceph_get_snap_realm()
82 spin_unlock(&mdsc->snap_empty_lock); in ceph_get_snap_realm()
113 struct ceph_mds_client *mdsc, in ceph_create_snap_realm() argument
118 lockdep_assert_held_write(&mdsc->snap_rwsem); in ceph_create_snap_realm()
137 __insert_snap_realm(&mdsc->snap_realms, realm); in ceph_create_snap_realm()
138 mdsc->num_snap_realms++; in ceph_create_snap_realm()
149 static struct ceph_snap_realm *__lookup_snap_realm(struct ceph_mds_client *mdsc, in __lookup_snap_realm() argument
152 struct rb_node *n = mdsc->snap_realms.rb_node; in __lookup_snap_realm()
[all …]
Dmds_client.c61 static void __wake_requests(struct ceph_mds_client *mdsc,
775 struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, in __ceph_lookup_mds_session() argument
778 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __ceph_lookup_mds_session()
780 return ceph_get_mds_session(mdsc->sessions[mds]); in __ceph_lookup_mds_session()
783 static bool __have_session(struct ceph_mds_client *mdsc, int mds) in __have_session() argument
785 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __have_session()
791 static int __verify_registered_session(struct ceph_mds_client *mdsc, in __verify_registered_session() argument
794 if (s->s_mds >= mdsc->max_sessions || in __verify_registered_session()
795 mdsc->sessions[s->s_mds] != s) in __verify_registered_session()
804 static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, in register_session() argument
[all …]
Dcaps.c45 static u64 __get_oldest_flush_tid(struct ceph_mds_client *mdsc);
46 static void __kick_flushing_caps(struct ceph_mds_client *mdsc,
127 void ceph_caps_init(struct ceph_mds_client *mdsc) in ceph_caps_init() argument
129 INIT_LIST_HEAD(&mdsc->caps_list); in ceph_caps_init()
130 spin_lock_init(&mdsc->caps_list_lock); in ceph_caps_init()
133 void ceph_caps_finalize(struct ceph_mds_client *mdsc) in ceph_caps_finalize() argument
137 spin_lock(&mdsc->caps_list_lock); in ceph_caps_finalize()
138 while (!list_empty(&mdsc->caps_list)) { in ceph_caps_finalize()
139 cap = list_first_entry(&mdsc->caps_list, in ceph_caps_finalize()
144 mdsc->caps_total_count = 0; in ceph_caps_finalize()
[all …]
Ddebugfs.c31 if (!fsc->mdsc || !fsc->mdsc->mdsmap) in mdsmap_show()
33 mdsmap = fsc->mdsc->mdsmap; in mdsmap_show()
55 struct ceph_mds_client *mdsc = fsc->mdsc; in mdsc_show() local
62 mutex_lock(&mdsc->mutex); in mdsc_show()
63 for (rp = rb_first(&mdsc->request_tree); rp; rp = rb_next(rp)) { in mdsc_show()
125 mutex_unlock(&mdsc->mutex); in mdsc_show()
152 struct ceph_client_metric *m = &fsc->mdsc->metric; in metrics_file_show()
176 struct ceph_client_metric *cm = &fsc->mdsc->metric; in metrics_latency_show()
202 struct ceph_client_metric *cm = &fsc->mdsc->metric; in metrics_size_show()
232 struct ceph_client_metric *m = &fsc->mdsc->metric; in metrics_caps_show()
[all …]
Dmds_client.h237 typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc,
242 typedef int (*ceph_mds_request_wait_callback_t) (struct ceph_mds_client *mdsc,
496 extern int ceph_send_msg_mds(struct ceph_mds_client *mdsc,
500 extern void ceph_mdsc_close_sessions(struct ceph_mds_client *mdsc);
501 extern void ceph_mdsc_force_umount(struct ceph_mds_client *mdsc);
504 extern void ceph_mdsc_sync(struct ceph_mds_client *mdsc);
510 ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode);
511 extern int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc,
514 int ceph_mdsc_wait_request(struct ceph_mds_client *mdsc,
517 extern int ceph_mdsc_do_request(struct ceph_mds_client *mdsc,
[all …]
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.c41 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dentry->d_sb); in ceph_d_init() local
53 atomic64_inc(&mdsc->metric.total_dentries); in ceph_d_init()
311 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local
346 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_WR); in ceph_readdir()
389 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_readdir()
426 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir()
751 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local
777 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup()
789 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
803 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
[all …]
Dexport.c125 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __lookup_inode() local
141 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, in __lookup_inode()
153 err = ceph_mdsc_do_request(mdsc, NULL, req); in __lookup_inode()
207 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __snapfh_to_dentry() local
240 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, in __snapfh_to_dentry()
261 err = ceph_mdsc_do_request(mdsc, NULL, req); in __snapfh_to_dentry()
319 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __get_parent() local
325 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPPARENT, in __get_parent()
346 err = ceph_mdsc_do_request(mdsc, NULL, req); in __get_parent()
464 req = ceph_mdsc_create_request(fsc->mdsc, CEPH_MDS_OP_LSSNAP, in __get_snap_name()
[all …]
Dsuper.h122 struct ceph_mds_client *mdsc; member
464 return (struct ceph_mds_client *)ceph_sb_to_client(sb)->mdsc; in ceph_sb_to_mdsc()
761 extern void ceph_caps_init(struct ceph_mds_client *mdsc);
762 extern void ceph_caps_finalize(struct ceph_mds_client *mdsc);
763 extern void ceph_adjust_caps_max_min(struct ceph_mds_client *mdsc,
765 extern int ceph_reserve_caps(struct ceph_mds_client *mdsc,
767 extern void ceph_unreserve_caps(struct ceph_mds_client *mdsc,
935 struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc,
937 extern void ceph_get_snap_realm(struct ceph_mds_client *mdsc,
939 extern void ceph_put_snap_realm(struct ceph_mds_client *mdsc,
[all …]
Dmetric.c17 static bool ceph_mdsc_send_metrics(struct ceph_mds_client *mdsc, in ceph_mdsc_send_metrics() argument
31 struct ceph_client_metric *m = &mdsc->metric; in ceph_mdsc_send_metrics()
177 static void metric_get_session(struct ceph_mds_client *mdsc) in metric_get_session() argument
182 mutex_lock(&mdsc->mutex); in metric_get_session()
183 for (i = 0; i < mdsc->max_sessions; i++) { in metric_get_session()
184 s = __ceph_lookup_mds_session(mdsc, i); in metric_get_session()
195 mdsc->metric.session = s; in metric_get_session()
201 mutex_unlock(&mdsc->mutex); in metric_get_session()
208 struct ceph_mds_client *mdsc = in metric_delayed_work() local
211 if (mdsc->stopping) in metric_delayed_work()
[all …]
Dlocks.c13 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc,
62 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_lock_message() local
82 req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); in ceph_lock_message()
110 err = ceph_mdsc_submit_request(mdsc, inode, req); in ceph_lock_message()
112 err = ceph_mdsc_wait_request(mdsc, req, wait ? 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.c49 ceph_mdsc_close_sessions(fsc->mdsc); in ceph_put_super()
60 if (fsc->mdsc->mdsmap->m_num_data_pg_pools == 1) { in ceph_statfs()
61 data_pool = fsc->mdsc->mdsmap->m_data_pg_pools[0]; in ceph_statfs()
123 ceph_flush_dirty_caps(fsc->mdsc); in ceph_sync_fs()
130 ceph_mdsc_sync(fsc->mdsc); in ceph_sync_fs()
754 ceph_mdsc_handle_mdsmap(fsc->mdsc, msg); in extra_mon_dispatch()
757 ceph_mdsc_handle_fsmap(fsc->mdsc, msg); in extra_mon_dispatch()
974 ceph_mdsc_force_umount(fsc->mdsc); in __ceph_umount_begin()
1014 struct ceph_mds_client *mdsc = fsc->mdsc; in open_root_dentry() local
1021 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, USE_ANY_MDS); in open_root_dentry()
[all …]
Daddr.c225 ceph_update_read_metrics(&fsc->mdsc->metric, req->r_start_latency, in finish_netfs_read()
254 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_netfs_issue_op_inline() local
269 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, mode); in ceph_netfs_issue_op_inline()
278 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_netfs_issue_op_inline()
625 ceph_update_write_metrics(&fsc->mdsc->metric, req->r_start_latency, in writepage_nounlock()
770 ceph_update_write_metrics(&fsc->mdsc->metric, req->r_start_latency, in writepages_finish()
1737 ceph_update_write_metrics(&fsc->mdsc->metric, req->r_start_latency, in ceph_uninline_data()
1745 down_read(&fsc->mdsc->snap_rwsem); in ceph_uninline_data()
1750 up_read(&fsc->mdsc->snap_rwsem); in ceph_uninline_data()
1794 struct ceph_mds_client *mdsc = fsc->mdsc; in __ceph_pool_perm_get() local
[all …]
Dinode.c45 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_set_ino_cb() local
50 percpu_counter_inc(&mdsc->metric.total_inodes); in ceph_set_ino_cb()
564 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_evict_inode() local
570 percpu_counter_dec(&mdsc->metric.total_inodes); in ceph_evict_inode()
594 ceph_put_snapid_map(mdsc, ci->i_snapid_map); in ceph_evict_inode()
764 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_fill_inode() local
781 lockdep_assert_held(&mdsc->snap_rwsem); in ceph_fill_inode()
810 new_cap = ceph_get_cap(mdsc, caps_reservation); in ceph_fill_inode()
832 ci->i_snapid_map = ceph_get_snapid_map(mdsc, ceph_snap(inode)); in ceph_fill_inode()
1061 __ceph_touch_fmode(ci, mdsc, cap_fmode); in ceph_fill_inode()
[all …]
Dfile.c184 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(sb); in prepare_open_request() local
192 req = ceph_mdsc_create_request(mdsc, op, want_auth); in prepare_open_request()
302 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_renew_caps() local
308 __ceph_touch_fmode(ci, mdsc, fmode); in ceph_renew_caps()
343 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_renew_caps()
360 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_open() local
404 __ceph_touch_fmode(ci, mdsc, fmode); in ceph_open()
416 __ceph_touch_fmode(ci, mdsc, fmode); in ceph_open()
433 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_open()
547 static void ceph_async_create_cb(struct ceph_mds_client *mdsc, in ceph_async_create_cb() argument
[all …]
Dxattr.c1067 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_sync_setxattr() local
1092 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_sync_setxattr()
1119 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_sync_setxattr()
1134 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in __ceph_setxattr() local
1189 (required_blob_size > mdsc->mdsmap->m_max_xattr_size)) { in __ceph_setxattr()
1192 mdsc->mdsmap->m_max_xattr_size); in __ceph_setxattr()
1198 if (!down_read_trylock(&mdsc->snap_rwsem)) { in __ceph_setxattr()
1200 down_read(&mdsc->snap_rwsem); in __ceph_setxattr()
1241 up_read(&mdsc->snap_rwsem); in __ceph_setxattr()
1251 up_read(&mdsc->snap_rwsem); in __ceph_setxattr()