| /linux-4.4.14/fs/ceph/ |
| D | mds_client.c | 54 static void __wake_requests(struct ceph_mds_client *mdsc, 391 struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, in __ceph_lookup_mds_session() argument 396 if (mds >= mdsc->max_sessions || mdsc->sessions[mds] == NULL) in __ceph_lookup_mds_session() 398 session = mdsc->sessions[mds]; in __ceph_lookup_mds_session() 405 static bool __have_session(struct ceph_mds_client *mdsc, int mds) in __have_session() argument 407 if (mds >= mdsc->max_sessions) in __have_session() 409 return mdsc->sessions[mds]; in __have_session() 412 static int __verify_registered_session(struct ceph_mds_client *mdsc, in __verify_registered_session() argument 415 if (s->s_mds >= mdsc->max_sessions || in __verify_registered_session() 416 mdsc->sessions[s->s_mds] != s) in __verify_registered_session() [all …]
|
| D | snap.c | 62 void ceph_get_snap_realm(struct ceph_mds_client *mdsc, in ceph_get_snap_realm() argument 74 spin_lock(&mdsc->snap_empty_lock); in ceph_get_snap_realm() 76 spin_unlock(&mdsc->snap_empty_lock); in ceph_get_snap_realm() 108 struct ceph_mds_client *mdsc, in ceph_create_snap_realm() argument 125 __insert_snap_realm(&mdsc->snap_realms, realm); in ceph_create_snap_realm() 135 static struct ceph_snap_realm *__lookup_snap_realm(struct ceph_mds_client *mdsc, in __lookup_snap_realm() argument 138 struct rb_node *n = mdsc->snap_realms.rb_node; in __lookup_snap_realm() 155 struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc, in ceph_lookup_snap_realm() argument 159 r = __lookup_snap_realm(mdsc, ino); in ceph_lookup_snap_realm() 161 ceph_get_snap_realm(mdsc, r); in ceph_lookup_snap_realm() [all …]
|
| D | caps.c | 118 void ceph_caps_init(struct ceph_mds_client *mdsc) in ceph_caps_init() argument 120 INIT_LIST_HEAD(&mdsc->caps_list); in ceph_caps_init() 121 spin_lock_init(&mdsc->caps_list_lock); in ceph_caps_init() 124 void ceph_caps_finalize(struct ceph_mds_client *mdsc) in ceph_caps_finalize() argument 128 spin_lock(&mdsc->caps_list_lock); in ceph_caps_finalize() 129 while (!list_empty(&mdsc->caps_list)) { in ceph_caps_finalize() 130 cap = list_first_entry(&mdsc->caps_list, in ceph_caps_finalize() 135 mdsc->caps_total_count = 0; in ceph_caps_finalize() 136 mdsc->caps_avail_count = 0; in ceph_caps_finalize() 137 mdsc->caps_use_count = 0; in ceph_caps_finalize() [all …]
|
| D | debugfs.c | 26 if (fsc->mdsc == NULL || fsc->mdsc->mdsmap == NULL) in mdsmap_show() 28 seq_printf(s, "epoch %d\n", fsc->mdsc->mdsmap->m_epoch); in mdsmap_show() 29 seq_printf(s, "root %d\n", fsc->mdsc->mdsmap->m_root); in mdsmap_show() 31 fsc->mdsc->mdsmap->m_session_timeout); in mdsmap_show() 33 fsc->mdsc->mdsmap->m_session_autoclose); in mdsmap_show() 34 for (i = 0; i < fsc->mdsc->mdsmap->m_max_mds; i++) { in mdsmap_show() 36 &fsc->mdsc->mdsmap->m_info[i].addr; in mdsmap_show() 37 int state = fsc->mdsc->mdsmap->m_info[i].state; in mdsmap_show() 52 struct ceph_mds_client *mdsc = fsc->mdsc; in mdsc_show() local 59 mutex_lock(&mdsc->mutex); in mdsc_show() [all …]
|
| D | mds_client.h | 170 typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc, 175 typedef int (*ceph_mds_request_wait_callback_t) (struct ceph_mds_client *mdsc, 367 extern int ceph_send_msg_mds(struct ceph_mds_client *mdsc, 371 extern void ceph_mdsc_close_sessions(struct ceph_mds_client *mdsc); 372 extern void ceph_mdsc_force_umount(struct ceph_mds_client *mdsc); 375 extern void ceph_mdsc_sync(struct ceph_mds_client *mdsc); 377 extern void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc, 385 ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode); 386 extern void ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, 388 extern int ceph_mdsc_do_request(struct ceph_mds_client *mdsc, [all …]
|
| D | export.c | 63 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __fh_to_dentry() local 75 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, in __fh_to_dentry() 82 err = ceph_mdsc_do_request(mdsc, NULL, req); in __fh_to_dentry() 127 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __get_parent() local 133 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPPARENT, in __get_parent() 148 err = ceph_mdsc_do_request(mdsc, NULL, req); in __get_parent() 208 struct ceph_mds_client *mdsc; in ceph_get_name() local 212 mdsc = ceph_inode_to_client(d_inode(child))->mdsc; in ceph_get_name() 213 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPNAME, in ceph_get_name() 225 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_get_name()
|
| D | ioctl.c | 36 static long __validate_layout(struct ceph_mds_client *mdsc, in __validate_layout() argument 49 mutex_lock(&mdsc->mutex); in __validate_layout() 51 for (i = 0; i < mdsc->mdsmap->m_num_data_pg_pools; i++) in __validate_layout() 52 if (mdsc->mdsmap->m_data_pg_pools[i] == l->data_pool) { in __validate_layout() 56 mutex_unlock(&mdsc->mutex); in __validate_layout() 66 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_ioctl_set_layout() local 102 err = __validate_layout(mdsc, &nl); in ceph_ioctl_set_layout() 106 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETLAYOUT, in ceph_ioctl_set_layout() 124 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_ioctl_set_layout() 141 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_ioctl_set_layout_policy() local [all …]
|
| D | dir.c | 260 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local 326 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_readdir() 354 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir() 624 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_lookup() local 664 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup() 672 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup() 711 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_mknod() local 725 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod() 741 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod() 764 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_symlink() local [all …]
|
| D | super.h | 84 struct ceph_mds_client *mdsc; member 607 extern void ceph_caps_init(struct ceph_mds_client *mdsc); 608 extern void ceph_caps_finalize(struct ceph_mds_client *mdsc); 609 extern void ceph_adjust_min_caps(struct ceph_mds_client *mdsc, int delta); 610 extern void ceph_reserve_caps(struct ceph_mds_client *mdsc, 612 extern int ceph_unreserve_caps(struct ceph_mds_client *mdsc, 724 struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc, 726 extern void ceph_get_snap_realm(struct ceph_mds_client *mdsc, 728 extern void ceph_put_snap_realm(struct ceph_mds_client *mdsc, 733 extern void ceph_handle_snap(struct ceph_mds_client *mdsc, [all …]
|
| D | locks.c | 12 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, 39 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in ceph_lock_message() local 48 req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); in ceph_lock_message() 79 err = ceph_mdsc_do_request(mdsc, inode, req); in ceph_lock_message() 107 static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, in ceph_lock_wait_for_completion() argument 130 intr_req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETFILELOCK, in ceph_lock_wait_for_completion() 143 err = ceph_mdsc_do_request(mdsc, inode, intr_req); in ceph_lock_wait_for_completion()
|
| D | xattr.c | 853 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_sync_setxattr() local 874 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETXATTR, in ceph_sync_setxattr() 898 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_sync_setxattr() 914 struct ceph_mds_client *mdsc = ceph_sb_to_client(dentry->d_sb)->mdsc; in __ceph_setxattr() local 966 if (!down_read_trylock(&mdsc->snap_rwsem)) { in __ceph_setxattr() 968 down_read(&mdsc->snap_rwsem); in __ceph_setxattr() 1007 up_read(&mdsc->snap_rwsem); in __ceph_setxattr() 1017 up_read(&mdsc->snap_rwsem); in __ceph_setxattr() 1045 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_send_removexattr() local 1050 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_RMXATTR, in ceph_send_removexattr() [all …]
|
| D | super.c | 42 ceph_mdsc_close_sessions(fsc->mdsc); in ceph_put_super() 95 ceph_flush_dirty_caps(fsc->mdsc); in ceph_sync_fs() 102 ceph_mdsc_sync(fsc->mdsc); in ceph_sync_fs() 498 ceph_mdsc_handle_map(fsc->mdsc, msg); in extra_mon_dispatch() 711 ceph_mdsc_force_umount(fsc->mdsc); in ceph_umount_begin() 735 struct ceph_mds_client *mdsc = fsc->mdsc; in open_root_dentry() local 742 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, USE_ANY_MDS); in open_root_dentry() 757 err = ceph_mdsc_do_request(mdsc, NULL, req); in open_root_dentry() 1001 ceph_mdsc_close_sessions(fsc->mdsc); in ceph_mount() 1020 ceph_mdsc_pre_umount(fsc->mdsc); in ceph_kill_sb()
|
| D | file.c | 114 struct ceph_mds_client *mdsc = fsc->mdsc; in prepare_open_request() local 122 req = ceph_mdsc_create_request(mdsc, op, want_auth); in prepare_open_request() 142 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_init_file() local 154 ceph_fscache_register_inode_cookie(mdsc->fsc, ci); in ceph_init_file() 204 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_open() local 280 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_open() 299 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_atomic_open() local 339 err = ceph_mdsc_do_request(mdsc, in ceph_atomic_open()
|
| D | inode.c | 497 struct ceph_mds_client *mdsc = in ceph_destroy_inode() local 498 ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc; in ceph_destroy_inode() 505 ceph_put_snap_realm(mdsc, realm); in ceph_destroy_inode() 669 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; in fill_inode() local 688 new_cap = ceph_get_cap(mdsc, caps_reservation); in fill_inode() 919 ceph_put_cap(mdsc, new_cap); in fill_inode() 1777 struct ceph_mds_client *mdsc = ceph_sb_to_client(dentry->d_sb)->mdsc; in ceph_setattr() local 1797 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETATTR, in ceph_setattr() 1810 if (!down_read_trylock(&mdsc->snap_rwsem)) { in ceph_setattr() 1812 down_read(&mdsc->snap_rwsem); in ceph_setattr() [all …]
|
| D | addr.c | 1623 struct ceph_mds_client *mdsc = fsc->mdsc; in __ceph_pool_perm_get() local 1630 down_read(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1631 p = &mdsc->pool_perm_tree.rb_node; in __ceph_pool_perm_get() 1643 up_read(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1649 down_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1664 up_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1740 rb_insert_color(&perm->node, &mdsc->pool_perm_tree); in __ceph_pool_perm_get() 1743 up_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1805 void ceph_pool_perm_destroy(struct ceph_mds_client *mdsc) in ceph_pool_perm_destroy() argument 1810 while (!RB_EMPTY_ROOT(&mdsc->pool_perm_tree)) { in ceph_pool_perm_destroy() [all …]
|