| /linux/fs/ceph/ |
| A D | mds_client.c | 681 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __ceph_lookup_mds_session() 688 if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) in __have_session() 3134 if (mdsc->stopping && !__get_oldest_req(mdsc)) in handle_reply() 4566 if (!mdsc) in ceph_mdsc_init() 4620 fsc->mdsc = mdsc; in ceph_mdsc_init() 4882 __wake_requests(mdsc, &mdsc->waiting_for_map); in ceph_mdsc_force_umount() 4908 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_mdsc_destroy() local 4911 if (!mdsc) in ceph_mdsc_destroy() 4990 __wake_requests(mdsc, &mdsc->waiting_for_map); in ceph_mdsc_handle_fsmap() 5017 if (mdsc->mdsmap && epoch <= mdsc->mdsmap->m_epoch) { in ceph_mdsc_handle_mdsmap() [all …]
|
| A D | quota.c | 236 up_read(&mdsc->snap_rwsem); in get_quota_realm() 238 down_read(&mdsc->snap_rwsem); in get_quota_realm() 278 down_read(&mdsc->snap_rwsem); in ceph_quota_is_same_realm() 282 up_read(&mdsc->snap_rwsem); in ceph_quota_is_same_realm() 288 up_read(&mdsc->snap_rwsem); in ceph_quota_is_same_realm() 324 down_read(&mdsc->snap_rwsem); in check_quota_exceeded() 342 up_read(&mdsc->snap_rwsem); in check_quota_exceeded() 395 up_read(&mdsc->snap_rwsem); in check_quota_exceeded() 475 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_quota_update_statfs() local 482 down_read(&mdsc->snap_rwsem); in ceph_quota_update_statfs() [all …]
|
| A D | snap.c | 113 struct ceph_mds_client *mdsc, in ceph_create_snap_realm() argument 133 mdsc->num_snap_realms++; in ceph_create_snap_realm() 172 ceph_get_snap_realm(mdsc, r); in ceph_lookup_snap_realm() 190 mdsc->num_snap_realms--; in __destroy_snap_realm() 231 up_write(&mdsc->snap_rwsem); in ceph_put_snap_realm() 265 down_write(&mdsc->snap_rwsem); in ceph_cleanup_empty_realms() 266 __cleanup_empty_realms(mdsc); in ceph_cleanup_empty_realms() 267 up_write(&mdsc->snap_rwsem); in ceph_cleanup_empty_realms() 865 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; in ceph_change_snap_realm() local 1014 __lookup_snap_realm(mdsc, in ceph_handle_snap() [all …]
|
| A D | caps.c | 161 mdsc->caps_use_max < mdsc->caps_min_count) in ceph_adjust_caps_max_min() 162 mdsc->caps_use_max = mdsc->caps_min_count; in ceph_adjust_caps_max_min() 175 mdsc->caps_reserve_count + mdsc->caps_min_count) { in __ceph_unreserve_caps() 189 mdsc->caps_total_count, mdsc->caps_use_count, in __ceph_unreserve_caps() 190 mdsc->caps_reserve_count, mdsc->caps_avail_count); in __ceph_unreserve_caps() 223 BUG_ON(mdsc->caps_total_count != mdsc->caps_use_count + in ceph_reserve_caps() 318 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_unreserve_caps() 410 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_reservation_status() local 1121 mdsc = ceph_inode_to_client(&ci->vfs_inode)->mdsc; in __ceph_remove_cap() 2884 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_get_caps() local [all …]
|
| A D | debugfs.c | 31 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() 125 mutex_unlock(&mdsc->mutex); in mdsc_show() 266 struct ceph_mds_client *mdsc = fsc->mdsc; in caps_show() local 280 mutex_lock(&mdsc->mutex); in caps_show() 292 mutex_lock(&mdsc->mutex); in caps_show() 314 struct ceph_mds_client *mdsc = fsc->mdsc; in mds_sessions_show() local 319 mutex_lock(&mdsc->mutex); in mds_sessions_show() [all …]
|
| A D | dir.c | 311 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local 1140 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local 1277 struct ceph_mds_client *mdsc; in __ceph_dentry_lease_touch() local 1287 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch() 1311 struct ceph_mds_client *mdsc; in __ceph_dentry_dir_lease_touch() local 1334 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch() 1348 mdsc = ceph_sb_to_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist() 1380 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk() 1504 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries() 1505 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries() [all …]
|
| A D | ioctl.c | 50 mutex_lock(&mdsc->mutex); in __validate_layout() 52 for (i = 0; i < mdsc->mdsmap->m_num_data_pg_pools; i++) 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() 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 148 err = __validate_layout(mdsc, &l); in ceph_ioctl_set_layout_policy() 170 err = ceph_mdsc_do_request(mdsc, inode, req); in ceph_ioctl_set_layout_policy() 246 struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; in ceph_ioctl_lazyio() local [all …]
|
| A D | mds_client.h | 492 extern int ceph_send_msg_mds(struct ceph_mds_client *mdsc, 496 extern void ceph_mdsc_close_sessions(struct ceph_mds_client *mdsc); 497 extern void ceph_mdsc_force_umount(struct ceph_mds_client *mdsc); 500 extern void ceph_mdsc_sync(struct ceph_mds_client *mdsc); 507 extern int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, 510 extern int ceph_mdsc_do_request(struct ceph_mds_client *mdsc, 532 extern void ceph_flush_cap_releases(struct ceph_mds_client *mdsc, 540 extern void ceph_mdsc_pre_umount(struct ceph_mds_client *mdsc); 556 extern void ceph_mdsc_handle_mdsmap(struct ceph_mds_client *mdsc, 558 extern void ceph_mdsc_handle_fsmap(struct ceph_mds_client *mdsc, [all …]
|
| A D | export.c | 125 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() 206 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __snapfh_to_dentry() local 260 err = ceph_mdsc_do_request(mdsc, NULL, req); in __snapfh_to_dentry() 318 struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; in __get_parent() local 345 err = ceph_mdsc_do_request(mdsc, NULL, req); in __get_parent() 488 err = ceph_mdsc_do_request(fsc->mdsc, NULL, req); in __get_snap_name() 535 struct ceph_mds_client *mdsc; in ceph_get_name() local 543 mdsc = ceph_inode_to_client(inode)->mdsc; in ceph_get_name() [all …]
|
| A D | super.h | 120 struct ceph_mds_client *mdsc; member 457 return (struct ceph_mds_client *)ceph_sb_to_client(sb)->mdsc; in ceph_sb_to_mdsc() 750 extern void ceph_caps_init(struct ceph_mds_client *mdsc); 751 extern void ceph_caps_finalize(struct ceph_mds_client *mdsc); 754 extern int ceph_reserve_caps(struct ceph_mds_client *mdsc, 756 extern void ceph_unreserve_caps(struct ceph_mds_client *mdsc, 931 extern void ceph_handle_snap(struct ceph_mds_client *mdsc, 1153 extern void ceph_put_cap(struct ceph_mds_client *mdsc, 1206 struct ceph_mds_client *mdsc, int fmode); 1244 extern int ceph_trim_dentries(struct ceph_mds_client *mdsc); [all …]
|
| A D | metric.c | 25 struct ceph_client_metric *m = &mdsc->metric; in ceph_mdsc_send_metrics() 164 ceph_client_gid(mdsc->fsc->client), s->s_mds); in ceph_mdsc_send_metrics() 176 mutex_lock(&mdsc->mutex); in metric_get_session() 177 for (i = 0; i < mdsc->max_sessions; i++) { in metric_get_session() 178 s = __ceph_lookup_mds_session(mdsc, i); in metric_get_session() 189 mdsc->metric.session = s; in metric_get_session() 195 mutex_unlock(&mdsc->mutex); in metric_get_session() 202 struct ceph_mds_client *mdsc = in metric_delayed_work() local 205 if (mdsc->stopping) in metric_delayed_work() 213 metric_get_session(mdsc); in metric_delayed_work() [all …]
|
| A 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_mdsc(inode->i_sb); 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()
|
| A D | super.c | 47 ceph_mdsc_close_sessions(fsc->mdsc); in ceph_put_super() 58 if (fsc->mdsc->mdsmap->m_num_data_pg_pools == 1) { in ceph_statfs() 119 ceph_flush_dirty_caps(fsc->mdsc); in ceph_sync_fs() 126 ceph_mdsc_sync(fsc->mdsc); in ceph_sync_fs() 621 ceph_mdsc_handle_mdsmap(fsc->mdsc, msg); in extra_mon_dispatch() 624 ceph_mdsc_handle_fsmap(fsc->mdsc, msg); in extra_mon_dispatch() 838 ceph_mdsc_force_umount(fsc->mdsc); in __ceph_umount_begin() 878 struct ceph_mds_client *mdsc = fsc->mdsc; in open_root_dentry() local 900 err = ceph_mdsc_do_request(mdsc, NULL, req); in open_root_dentry() 1126 ceph_mdsc_close_sessions(fsc->mdsc); in ceph_get_tree() [all …]
|
| A D | inode.c | 50 percpu_counter_inc(&mdsc->metric.total_inodes); in ceph_set_ino_cb() 564 percpu_counter_dec(&mdsc->metric.total_inodes); in ceph_evict_inode() 586 ceph_put_snapid_map(mdsc, ci->i_snapid_map); in ceph_evict_inode() 771 lockdep_assert_held(&mdsc->snap_rwsem); in ceph_fill_inode() 1051 __ceph_touch_fmode(ci, mdsc, cap_fmode); in ceph_fill_inode() 1078 ceph_put_cap(mdsc, new_cap); in ceph_fill_inode() 1999 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in __ceph_setattr() local 2027 down_read(&mdsc->snap_rwsem); in __ceph_setattr() 2182 up_read(&mdsc->snap_rwsem); in __ceph_setattr() 2253 struct ceph_mds_client *mdsc = fsc->mdsc; in __ceph_do_getattr() local [all …]
|
| A D | addr.c | 1757 struct ceph_mds_client *mdsc = fsc->mdsc; in __ceph_pool_perm_get() local 1765 down_read(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1766 p = &mdsc->pool_perm_tree.rb_node; in __ceph_pool_perm_get() 1787 up_read(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1797 down_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1798 p = &mdsc->pool_perm_tree.rb_node; in __ceph_pool_perm_get() 1822 up_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 1914 up_write(&mdsc->pool_perm_rwsem); in __ceph_pool_perm_get() 2001 while (!RB_EMPTY_ROOT(&mdsc->pool_perm_tree)) { in ceph_pool_perm_destroy() 2002 n = rb_first(&mdsc->pool_perm_tree); in ceph_pool_perm_destroy() [all …]
|
| A D | file.c | 290 __ceph_touch_fmode(ci, mdsc, fmode); in ceph_renew_caps() 325 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_renew_caps() 342 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_open() local 386 __ceph_touch_fmode(ci, mdsc, fmode); in ceph_open() 398 __ceph_touch_fmode(ci, mdsc, fmode); in ceph_open() 415 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_open() 632 down_read(&mdsc->snap_rwsem); in ceph_finish_async_create() 635 up_read(&mdsc->snap_rwsem); in ceph_finish_async_create() 680 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_atomic_open() local 756 err = ceph_mdsc_do_request(mdsc, in ceph_atomic_open() [all …]
|
| A D | xattr.c | 1050 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_sync_setxattr() local 1075 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_sync_setxattr() 1102 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_sync_setxattr() 1117 struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; in __ceph_setxattr() local 1175 if (!down_read_trylock(&mdsc->snap_rwsem)) { in __ceph_setxattr() 1177 down_read(&mdsc->snap_rwsem); in __ceph_setxattr() 1220 up_read(&mdsc->snap_rwsem); in __ceph_setxattr() 1230 up_read(&mdsc->snap_rwsem); in __ceph_setxattr()
|