/fs/ceph/ |
D | mds_client.c | 58 static void __wake_requests(struct ceph_mds_client *mdsc, 566 struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, in __ceph_lookup_mds_session() argument 569 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __ceph_lookup_mds_session() 571 return get_session(mdsc->sessions[mds]); in __ceph_lookup_mds_session() 574 static bool __have_session(struct ceph_mds_client *mdsc, int mds) in __have_session() argument 576 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __have_session() 582 static int __verify_registered_session(struct ceph_mds_client *mdsc, in __verify_registered_session() argument 585 if (s->s_mds >= mdsc->max_sessions || in __verify_registered_session() 586 mdsc->sessions[s->s_mds] != s) in __verify_registered_session() 595 static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, in register_session() argument [all …]
|
D | quota.c | 15 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; 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() 24 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; in ceph_has_realms_with_quotas() local 25 struct super_block *sb = mdsc->fsc->sb; in ceph_has_realms_with_quotas() 27 if (atomic64_read(&mdsc->quotarealms_count) > 0) in ceph_has_realms_with_quotas() 37 void ceph_handle_quota(struct ceph_mds_client *mdsc, in ceph_handle_quota() argument 41 struct super_block *sb = mdsc->fsc->sb; in ceph_handle_quota() 82 find_quotarealm_inode(struct ceph_mds_client *mdsc, u64 ino) in find_quotarealm_inode() argument 87 mutex_lock(&mdsc->quotarealms_inodes_mutex); in find_quotarealm_inode() [all …]
|
D | snap.c | 65 void ceph_get_snap_realm(struct ceph_mds_client *mdsc, in ceph_get_snap_realm() argument 77 spin_lock(&mdsc->snap_empty_lock); in ceph_get_snap_realm() 79 spin_unlock(&mdsc->snap_empty_lock); in ceph_get_snap_realm() 111 struct ceph_mds_client *mdsc, in ceph_create_snap_realm() argument 128 __insert_snap_realm(&mdsc->snap_realms, realm); in ceph_create_snap_realm() 129 mdsc->num_snap_realms++; in ceph_create_snap_realm() 140 static struct ceph_snap_realm *__lookup_snap_realm(struct ceph_mds_client *mdsc, in __lookup_snap_realm() argument 143 struct rb_node *n = mdsc->snap_realms.rb_node; in __lookup_snap_realm() 160 struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc, in ceph_lookup_snap_realm() argument 164 r = __lookup_snap_realm(mdsc, ino); in ceph_lookup_snap_realm() [all …]
|
D | caps.c | 45 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 …]
|
D | debugfs.c | 28 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() 140 struct ceph_mds_client *mdsc = fsc->mdsc; in caps_show() local 153 mutex_lock(&mdsc->mutex); in caps_show() 154 for (i = 0; i < mdsc->max_sessions; i++) { in caps_show() 157 session = __ceph_lookup_mds_session(mdsc, i); in caps_show() [all …]
|
D | dir.c | 309 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local 380 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_readdir() 417 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir() 737 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_lookup() local 774 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup() 787 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup() 826 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_mknod() local 848 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod() 865 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod() 888 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_symlink() local [all …]
|
D | mds_client.h | 211 typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc, 216 typedef int (*ceph_mds_request_wait_callback_t) (struct ceph_mds_client *mdsc, 456 extern int ceph_send_msg_mds(struct ceph_mds_client *mdsc, 460 extern void ceph_mdsc_close_sessions(struct ceph_mds_client *mdsc); 461 extern void ceph_mdsc_force_umount(struct ceph_mds_client *mdsc); 464 extern void ceph_mdsc_sync(struct ceph_mds_client *mdsc); 470 ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode); 471 extern int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, 474 extern int ceph_mdsc_do_request(struct ceph_mds_client *mdsc, 489 extern void ceph_flush_cap_releases(struct ceph_mds_client *mdsc, [all …]
|
D | ioctl.c | 37 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 …]
|
D | export.c | 125 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __lookup_inode() local 137 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, in __lookup_inode() 149 err = ceph_mdsc_do_request(mdsc, NULL, req); in __lookup_inode() 188 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __snapfh_to_dentry() local 212 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, in __snapfh_to_dentry() 233 err = ceph_mdsc_do_request(mdsc, NULL, req); in __snapfh_to_dentry() 290 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __get_parent() local 296 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPPARENT, in __get_parent() 317 err = ceph_mdsc_do_request(mdsc, NULL, req); in __get_parent() 430 req = ceph_mdsc_create_request(fsc->mdsc, CEPH_MDS_OP_LSSNAP, in __get_snap_name() [all …]
|
D | super.h | 113 struct ceph_mds_client *mdsc; member 688 extern void ceph_caps_init(struct ceph_mds_client *mdsc); 689 extern void ceph_caps_finalize(struct ceph_mds_client *mdsc); 690 extern void ceph_adjust_caps_max_min(struct ceph_mds_client *mdsc, 692 extern int ceph_reserve_caps(struct ceph_mds_client *mdsc, 694 extern void ceph_unreserve_caps(struct ceph_mds_client *mdsc, 860 struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc, 862 extern void ceph_get_snap_realm(struct ceph_mds_client *mdsc, 864 extern void ceph_put_snap_realm(struct ceph_mds_client *mdsc, 869 extern void ceph_handle_snap(struct ceph_mds_client *mdsc, [all …]
|
D | locks.c | 13 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, 66 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_lock_message() local 86 req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); in ceph_lock_message() 117 err = ceph_mdsc_do_request(mdsc, inode, req); in ceph_lock_message() 144 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, in ceph_lock_wait_for_completion() argument 167 mutex_lock(&mdsc->mutex); in ceph_lock_wait_for_completion() 186 mutex_unlock(&mdsc->mutex); in ceph_lock_wait_for_completion() 190 intr_req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETFILELOCK, in ceph_lock_wait_for_completion() 203 err = ceph_mdsc_do_request(mdsc, inode, intr_req); in ceph_lock_wait_for_completion()
|
D | super.c | 43 ceph_mdsc_close_sessions(fsc->mdsc); in ceph_put_super() 55 if (fsc->mdsc->mdsmap->m_num_data_pg_pools == 1) { in ceph_statfs() 56 data_pool = fsc->mdsc->mdsmap->m_data_pg_pools[0]; in ceph_statfs() 116 ceph_flush_dirty_caps(fsc->mdsc); in ceph_sync_fs() 123 ceph_mdsc_sync(fsc->mdsc); in ceph_sync_fs() 642 ceph_mdsc_handle_mdsmap(fsc->mdsc, msg); in extra_mon_dispatch() 645 ceph_mdsc_handle_fsmap(fsc->mdsc, msg); in extra_mon_dispatch() 859 ceph_mdsc_force_umount(fsc->mdsc); in ceph_umount_begin() 891 struct ceph_mds_client *mdsc = fsc->mdsc; in open_root_dentry() local 898 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, USE_ANY_MDS); in open_root_dentry() [all …]
|
D | inode.c | 554 struct ceph_mds_client *mdsc = in ceph_evict_inode() local 555 ceph_inode_to_client(inode)->mdsc; in ceph_evict_inode() 566 ceph_put_snap_realm(mdsc, realm); in ceph_evict_inode() 568 ceph_put_snapid_map(mdsc, ci->i_snapid_map); in ceph_evict_inode() 735 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; in fill_inode() local 758 new_cap = ceph_get_cap(mdsc, caps_reservation); in fill_inode() 777 ci->i_snapid_map = ceph_get_snapid_map(mdsc, ceph_snap(inode)); in fill_inode() 1032 ceph_put_cap(mdsc, new_cap); in fill_inode() 1995 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in __ceph_setattr() local 2008 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETATTR, in __ceph_setattr() [all …]
|
D | addr.c | 1818 struct ceph_mds_client *mdsc = fsc->mdsc; in __ceph_pool_perm_get() local 1826 down_read(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1827 p = &mdsc->pool_perm_tree.rb_node; in __ceph_pool_perm_get() 1848 up_read(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1858 down_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1859 p = &mdsc->pool_perm_tree.rb_node; in __ceph_pool_perm_get() 1883 up_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1972 rb_insert_color(&perm->node, &mdsc->pool_perm_tree); in __ceph_pool_perm_get() 1975 up_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 2053 void ceph_pool_perm_destroy(struct ceph_mds_client *mdsc) in ceph_pool_perm_destroy() argument [all …]
|
D | xattr.c | 951 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_sync_setxattr() local 975 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_sync_setxattr() 1000 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_sync_setxattr() 1015 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in __ceph_setxattr() local 1073 if (!down_read_trylock(&mdsc->snap_rwsem)) { in __ceph_setxattr() 1075 down_read(&mdsc->snap_rwsem); in __ceph_setxattr() 1117 up_read(&mdsc->snap_rwsem); in __ceph_setxattr() 1127 up_read(&mdsc->snap_rwsem); in __ceph_setxattr()
|
D | file.c | 184 struct ceph_mds_client *mdsc = fsc->mdsc; in prepare_open_request() local 192 req = ceph_mdsc_create_request(mdsc, op, want_auth); in prepare_open_request() 290 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_renew_caps() local 331 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_renew_caps() 348 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_open() local 424 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_open() 442 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_atomic_open() local 494 err = ceph_mdsc_do_request(mdsc, in ceph_atomic_open()
|