/linux/fs/ceph/ |
H A D | snap.c | 66 void ceph_get_snap_realm(struct ceph_mds_client *mdsc, in ceph_get_snap_realm() argument 69 lockdep_assert_held(&mdsc->snap_rwsem); in ceph_get_snap_realm() 80 spin_lock(&mdsc->snap_empty_lock); in ceph_get_snap_realm() 83 spin_unlock(&mdsc->snap_empty_lock); in ceph_get_snap_realm() 114 struct ceph_mds_client *mdsc, in ceph_create_snap_realm() argument 119 lockdep_assert_held_write(&mdsc->snap_rwsem); in ceph_create_snap_realm() 138 __insert_snap_realm(&mdsc->snap_realms, realm); in ceph_create_snap_realm() 139 mdsc->num_snap_realms++; in ceph_create_snap_realm() 141 doutc(mdsc->fsc->client, "%llx %p\n", realm->ino, realm); in ceph_create_snap_realm() 150 static struct ceph_snap_realm *__lookup_snap_realm(struct ceph_mds_client *mdsc, in __lookup_snap_realm() argument [all …]
|
H A D | quota.c | 15 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() 46 struct ceph_client *cl = mdsc->fsc->client; in ceph_handle_quota() 51 if (!ceph_inc_mds_stopping_blocker(mdsc, session)) in ceph_handle_quota() 81 ceph_dec_mds_stopping_blocker(mdsc); in ceph_handle_quota() 85 find_quotarealm_inode(struct ceph_mds_client * mdsc,u64 ino) find_quotarealm_inode() argument 130 lookup_quotarealm_inode(struct ceph_mds_client * mdsc,struct super_block * sb,struct ceph_snap_realm * realm) lookup_quotarealm_inode() argument 179 ceph_cleanup_quotarealms_inodes(struct ceph_mds_client * mdsc) ceph_cleanup_quotarealms_inodes() argument 214 get_quota_realm(struct ceph_mds_client * mdsc,struct inode * inode,enum quota_get_realm which_quota,struct ceph_snap_realm ** realmp,bool retry) get_quota_realm() argument 281 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old->i_sb); ceph_quota_is_same_realm() local 329 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); check_quota_exceeded() local 492 struct ceph_mds_client *mdsc = fsc->mdsc; ceph_quota_update_statfs() local [all...] |
H A D | mds_client.c | 63 static void __wake_requests(struct ceph_mds_client *mdsc, 934 struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, in __ceph_lookup_mds_session() argument 937 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __ceph_lookup_mds_session() 939 return ceph_get_mds_session(mdsc->sessions[mds]); in __ceph_lookup_mds_session() 942 static bool __have_session(struct ceph_mds_client *mdsc, int mds) in __have_session() argument 944 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __have_session() 950 static int __verify_registered_session(struct ceph_mds_client *mdsc, in __verify_registered_session() argument 953 if (s->s_mds >= mdsc->max_sessions || in __verify_registered_session() 954 mdsc->sessions[s->s_mds] != s) in __verify_registered_session() 963 static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, in register_session() argument [all …]
|
H A D | caps.c | 48 static u64 __get_oldest_flush_tid(struct ceph_mds_client *mdsc); 49 static void __kick_flushing_caps(struct ceph_mds_client *mdsc, 130 void ceph_caps_init(struct ceph_mds_client *mdsc) in ceph_caps_init() argument 132 INIT_LIST_HEAD(&mdsc->caps_list); in ceph_caps_init() 133 spin_lock_init(&mdsc->caps_list_lock); in ceph_caps_init() 136 void ceph_caps_finalize(struct ceph_mds_client *mdsc) in ceph_caps_finalize() argument 140 spin_lock(&mdsc->caps_list_lock); in ceph_caps_finalize() 141 while (!list_empty(&mdsc->caps_list)) { in ceph_caps_finalize() 142 cap = list_first_entry(&mdsc->caps_list, in ceph_caps_finalize() 147 mdsc->caps_total_count = 0; in ceph_caps_finalize() [all …]
|
H A D | ioctl.c | 38 static long __validate_layout(struct ceph_mds_client *mdsc, in __validate_layout() argument 51 mutex_lock(&mdsc->mutex); in __validate_layout() 53 for (i = 0; i < mdsc->mdsmap->m_num_data_pg_pools; i++) in __validate_layout() 54 if (mdsc->mdsmap->m_data_pg_pools[i] == l->data_pool) { in __validate_layout() 58 mutex_unlock(&mdsc->mutex); in __validate_layout() 68 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(inode->i_sb)->mdsc; in ceph_ioctl_set_layout() local 104 err = __validate_layout(mdsc, &nl); in ceph_ioctl_set_layout() 108 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETLAYOUT, in ceph_ioctl_set_layout() 126 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_ioctl_set_layout() 143 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(inode->i_sb)->mdsc; in ceph_ioctl_set_layout_policy() local [all …]
|
H A D | dir.c | 42 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dentry->d_sb); in ceph_d_init() local 54 atomic64_inc(&mdsc->metric.total_dentries); in ceph_d_init() 322 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local 365 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_WR); in ceph_readdir() 408 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_readdir() 456 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir() 799 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local 839 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup() 852 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup() 866 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup() [all …]
|
H A D | mds_client.h | 271 typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc, 276 typedef int (*ceph_mds_request_wait_callback_t) (struct ceph_mds_client *mdsc, 565 extern void ceph_mdsc_close_sessions(struct ceph_mds_client *mdsc); 566 extern void ceph_mdsc_force_umount(struct ceph_mds_client *mdsc); 569 extern void ceph_mdsc_sync(struct ceph_mds_client *mdsc); 575 ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode); 576 extern int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, 579 int ceph_mdsc_wait_request(struct ceph_mds_client *mdsc, 582 extern int ceph_mdsc_do_request(struct ceph_mds_client *mdsc, 598 extern void ceph_mdsc_iterate_sessions(struct ceph_mds_client *mdsc, [all …]
|
H A D | super.c | 51 ceph_mdsc_close_sessions(fsc->mdsc); in ceph_put_super() 64 if (fsc->mdsc->mdsmap->m_num_data_pg_pools == 1) { in ceph_statfs() 65 data_pool = fsc->mdsc->mdsmap->m_data_pg_pools[0]; in ceph_statfs() 128 ceph_flush_dirty_caps(fsc->mdsc); in ceph_sync_fs() 129 ceph_flush_cap_releases(fsc->mdsc); in ceph_sync_fs() 136 ceph_mdsc_sync(fsc->mdsc); in ceph_sync_fs() 802 ceph_mdsc_handle_mdsmap(fsc->mdsc, msg); in extra_mon_dispatch() 805 ceph_mdsc_handle_fsmap(fsc->mdsc, msg); in extra_mon_dispatch() 1023 ceph_mdsc_force_umount(fsc->mdsc); in __ceph_umount_begin() 1064 struct ceph_mds_client *mdsc = fsc->mdsc; in open_root_dentry() local [all …]
|
H A D | metric.c | 17 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() 34 struct ceph_client *cl = mdsc->fsc->client; in ceph_mdsc_send_metrics() 41 mutex_lock(&mdsc->mutex); in ceph_mdsc_send_metrics() 42 if (ceph_mdsmap_get_state(mdsc->mdsmap, s->s_mds) != CEPH_MDS_STATE_ACTIVE) { in ceph_mdsc_send_metrics() 43 mutex_unlock(&mdsc->mutex); in ceph_mdsc_send_metrics() 46 mutex_unlock(&mdsc->mutex); in ceph_mdsc_send_metrics() 186 static void metric_get_session(struct ceph_mds_client *mdsc) in metric_get_session() argument 191 mutex_lock(&mdsc->mutex); in metric_get_session() 192 for (i = 0; i < mdsc->max_sessions; i++) { in metric_get_session() [all …]
|
H A D | export.c | 128 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(sb)->mdsc; in __lookup_inode() local 144 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, in __lookup_inode() 156 err = ceph_mdsc_do_request(mdsc, NULL, req); in __lookup_inode() 210 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(sb)->mdsc; in __snapfh_to_dentry() local 211 struct ceph_client *cl = mdsc->fsc->client; in __snapfh_to_dentry() 244 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, in __snapfh_to_dentry() 265 err = ceph_mdsc_do_request(mdsc, NULL, req); in __snapfh_to_dentry() 321 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(sb)->mdsc; in __get_parent() local 327 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPPARENT, in __get_parent() 348 err = ceph_mdsc_do_request(mdsc, NULL, req); in __get_parent() [all …]
|
H A D | locks.c | 14 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, 79 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_lock_message() local 80 struct ceph_client *cl = mdsc->fsc->client; in ceph_lock_message() 100 req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); in ceph_lock_message() 129 err = ceph_mdsc_submit_request(mdsc, inode, req); in ceph_lock_message() 131 err = ceph_mdsc_wait_request(mdsc, req, wait ? in ceph_lock_message() 159 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, in ceph_lock_wait_for_completion() argument 162 struct ceph_client *cl = mdsc->fsc->client; in ceph_lock_wait_for_completion() 182 mutex_lock(&mdsc->mutex); in ceph_lock_wait_for_completion() 201 mutex_unlock(&mdsc->mutex); in ceph_lock_wait_for_completion() [all …]
|
H A D | addr.c | 219 ceph_update_read_metrics(&fsc->mdsc->metric, req->r_start_latency, in finish_netfs_read() 265 ceph_dec_osd_stopping_blocker(fsc->mdsc); in finish_netfs_read() 275 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_netfs_issue_op_inline() local 290 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, mode); in ceph_netfs_issue_op_inline() 300 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_netfs_issue_op_inline() 424 if (!ceph_inc_osd_stopping_blocker(fsc->mdsc)) { in ceph_netfs_issue_read() 780 ceph_update_write_metrics(&fsc->mdsc->metric, req->r_start_latency, in writepage_nounlock() 938 ceph_update_write_metrics(&fsc->mdsc->metric, req->r_start_latency, in writepages_finish() 949 ceph_dec_osd_stopping_blocker(fsc->mdsc); in writepages_finish() 1261 if (!ceph_inc_osd_stopping_blocker(fsc->mdsc)) { in ceph_writepages_start() [all …]
|
H A D | inode.c | 48 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_set_ino_cb() local 53 percpu_counter_inc(&mdsc->metric.total_inodes); in ceph_set_ino_cb() 134 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(sb); in ceph_get_inode() local 135 struct ceph_client *cl = mdsc->fsc->client; in ceph_get_inode() 689 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_evict_inode() local 696 percpu_counter_dec(&mdsc->metric.total_inodes); in ceph_evict_inode() 722 ceph_put_snapid_map(mdsc, ci->i_snapid_map); in ceph_evict_inode() 902 static int decode_encrypted_symlink(struct ceph_mds_client *mdsc, in decode_encrypted_symlink() argument 906 struct ceph_client *cl = mdsc->fsc->client; in decode_encrypted_symlink() 927 static int decode_encrypted_symlink(struct ceph_mds_client *mdsc, in decode_encrypted_symlink() argument [all …]
|
H A D | file.c | 23 static __le32 ceph_flags_sys2wire(struct ceph_mds_client *mdsc, u32 flags) in ceph_flags_sys2wire() argument 25 struct ceph_client *cl = mdsc->fsc->client; in ceph_flags_sys2wire() 182 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(sb); in prepare_open_request() local 190 req = ceph_mdsc_create_request(mdsc, op, want_auth); in prepare_open_request() 194 req->r_args.open.flags = ceph_flags_sys2wire(mdsc, flags); in prepare_open_request() 302 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); in ceph_renew_caps() local 303 struct ceph_client *cl = mdsc->fsc->client; in ceph_renew_caps() 309 __ceph_touch_fmode(ci, mdsc, fmode); in ceph_renew_caps() 345 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_renew_caps() 364 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_open() local [all …]
|
H A D | mdsmap.h | 74 struct ceph_mdsmap *ceph_mdsmap_decode(struct ceph_mds_client *mdsc, void **p,
|
H A D | mdsmap.c | 118 struct ceph_mdsmap *ceph_mdsmap_decode(struct ceph_mds_client *mdsc, void **p, in ceph_mdsmap_decode() argument 121 struct ceph_client *cl = mdsc->fsc->client; in ceph_mdsmap_decode()
|