mdsc 1818 fs/ceph/addr.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 1826 fs/ceph/addr.c down_read(&mdsc->pool_perm_rwsem); mdsc 1827 fs/ceph/addr.c p = &mdsc->pool_perm_tree.rb_node; mdsc 1848 fs/ceph/addr.c up_read(&mdsc->pool_perm_rwsem); mdsc 1858 fs/ceph/addr.c down_write(&mdsc->pool_perm_rwsem); mdsc 1859 fs/ceph/addr.c p = &mdsc->pool_perm_tree.rb_node; mdsc 1883 fs/ceph/addr.c up_write(&mdsc->pool_perm_rwsem); mdsc 1972 fs/ceph/addr.c rb_insert_color(&perm->node, &mdsc->pool_perm_tree); mdsc 1975 fs/ceph/addr.c up_write(&mdsc->pool_perm_rwsem); mdsc 2053 fs/ceph/addr.c void ceph_pool_perm_destroy(struct ceph_mds_client *mdsc) mdsc 2058 fs/ceph/addr.c while (!RB_EMPTY_ROOT(&mdsc->pool_perm_tree)) { mdsc 2059 fs/ceph/addr.c n = rb_first(&mdsc->pool_perm_tree); mdsc 2061 fs/ceph/addr.c rb_erase(n, &mdsc->pool_perm_tree); mdsc 45 fs/ceph/caps.c static u64 __get_oldest_flush_tid(struct ceph_mds_client *mdsc); mdsc 46 fs/ceph/caps.c static void __kick_flushing_caps(struct ceph_mds_client *mdsc, mdsc 127 fs/ceph/caps.c void ceph_caps_init(struct ceph_mds_client *mdsc) mdsc 129 fs/ceph/caps.c INIT_LIST_HEAD(&mdsc->caps_list); mdsc 130 fs/ceph/caps.c spin_lock_init(&mdsc->caps_list_lock); mdsc 133 fs/ceph/caps.c void ceph_caps_finalize(struct ceph_mds_client *mdsc) mdsc 137 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 138 fs/ceph/caps.c while (!list_empty(&mdsc->caps_list)) { mdsc 139 fs/ceph/caps.c cap = list_first_entry(&mdsc->caps_list, mdsc 144 fs/ceph/caps.c mdsc->caps_total_count = 0; mdsc 145 fs/ceph/caps.c mdsc->caps_avail_count = 0; mdsc 146 fs/ceph/caps.c mdsc->caps_use_count = 0; mdsc 147 fs/ceph/caps.c mdsc->caps_reserve_count = 0; mdsc 148 fs/ceph/caps.c mdsc->caps_min_count = 0; mdsc 149 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 152 fs/ceph/caps.c void ceph_adjust_caps_max_min(struct ceph_mds_client *mdsc, mdsc 155 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 156 fs/ceph/caps.c mdsc->caps_min_count = fsopt->max_readdir; mdsc 157 fs/ceph/caps.c if (mdsc->caps_min_count < 1024) mdsc 158 fs/ceph/caps.c mdsc->caps_min_count = 1024; mdsc 159 fs/ceph/caps.c mdsc->caps_use_max = fsopt->caps_max; mdsc 160 fs/ceph/caps.c if (mdsc->caps_use_max > 0 && mdsc 161 fs/ceph/caps.c mdsc->caps_use_max < mdsc->caps_min_count) mdsc 162 fs/ceph/caps.c mdsc->caps_use_max = mdsc->caps_min_count; mdsc 163 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 166 fs/ceph/caps.c static void __ceph_unreserve_caps(struct ceph_mds_client *mdsc, int nr_caps) mdsc 172 fs/ceph/caps.c BUG_ON(mdsc->caps_reserve_count < nr_caps); mdsc 173 fs/ceph/caps.c mdsc->caps_reserve_count -= nr_caps; mdsc 174 fs/ceph/caps.c if (mdsc->caps_avail_count >= mdsc 175 fs/ceph/caps.c mdsc->caps_reserve_count + mdsc->caps_min_count) { mdsc 176 fs/ceph/caps.c mdsc->caps_total_count -= nr_caps; mdsc 178 fs/ceph/caps.c cap = list_first_entry(&mdsc->caps_list, mdsc 184 fs/ceph/caps.c mdsc->caps_avail_count += nr_caps; mdsc 189 fs/ceph/caps.c mdsc->caps_total_count, mdsc->caps_use_count, mdsc 190 fs/ceph/caps.c mdsc->caps_reserve_count, mdsc->caps_avail_count); mdsc 191 fs/ceph/caps.c BUG_ON(mdsc->caps_total_count != mdsc->caps_use_count + mdsc 192 fs/ceph/caps.c mdsc->caps_reserve_count + mdsc 193 fs/ceph/caps.c mdsc->caps_avail_count); mdsc 200 fs/ceph/caps.c int ceph_reserve_caps(struct ceph_mds_client *mdsc, mdsc 216 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 217 fs/ceph/caps.c if (mdsc->caps_avail_count >= need) mdsc 220 fs/ceph/caps.c have = mdsc->caps_avail_count; mdsc 221 fs/ceph/caps.c mdsc->caps_avail_count -= have; mdsc 222 fs/ceph/caps.c mdsc->caps_reserve_count += have; mdsc 223 fs/ceph/caps.c BUG_ON(mdsc->caps_total_count != mdsc->caps_use_count + mdsc 224 fs/ceph/caps.c mdsc->caps_reserve_count + mdsc 225 fs/ceph/caps.c mdsc->caps_avail_count); mdsc 226 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 238 fs/ceph/caps.c for (j = 0; j < mdsc->max_sessions; j++) { mdsc 239 fs/ceph/caps.c s = __ceph_lookup_mds_session(mdsc, j); mdsc 242 fs/ceph/caps.c mutex_unlock(&mdsc->mutex); mdsc 246 fs/ceph/caps.c ceph_trim_caps(mdsc, s, max_caps); mdsc 250 fs/ceph/caps.c mutex_lock(&mdsc->mutex); mdsc 254 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 255 fs/ceph/caps.c if (mdsc->caps_avail_count) { mdsc 257 fs/ceph/caps.c if (mdsc->caps_avail_count >= need - i) mdsc 260 fs/ceph/caps.c more_have = mdsc->caps_avail_count; mdsc 264 fs/ceph/caps.c mdsc->caps_avail_count -= more_have; mdsc 265 fs/ceph/caps.c mdsc->caps_reserve_count += more_have; mdsc 268 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 285 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 286 fs/ceph/caps.c mdsc->caps_total_count += alloc; mdsc 287 fs/ceph/caps.c mdsc->caps_reserve_count += alloc; mdsc 288 fs/ceph/caps.c list_splice(&newcaps, &mdsc->caps_list); mdsc 290 fs/ceph/caps.c BUG_ON(mdsc->caps_total_count != mdsc->caps_use_count + mdsc 291 fs/ceph/caps.c mdsc->caps_reserve_count + mdsc 292 fs/ceph/caps.c mdsc->caps_avail_count); mdsc 295 fs/ceph/caps.c __ceph_unreserve_caps(mdsc, have + alloc); mdsc 297 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 300 fs/ceph/caps.c ctx, mdsc->caps_total_count, mdsc->caps_use_count, mdsc 301 fs/ceph/caps.c mdsc->caps_reserve_count, mdsc->caps_avail_count); mdsc 305 fs/ceph/caps.c void ceph_unreserve_caps(struct ceph_mds_client *mdsc, mdsc 313 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 314 fs/ceph/caps.c __ceph_unreserve_caps(mdsc, ctx->count); mdsc 317 fs/ceph/caps.c if (mdsc->caps_use_max > 0 && mdsc 318 fs/ceph/caps.c mdsc->caps_use_count > mdsc->caps_use_max) mdsc 320 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 323 fs/ceph/caps.c ceph_reclaim_caps_nr(mdsc, ctx->used); mdsc 326 fs/ceph/caps.c struct ceph_cap *ceph_get_cap(struct ceph_mds_client *mdsc, mdsc 335 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 336 fs/ceph/caps.c mdsc->caps_use_count++; mdsc 337 fs/ceph/caps.c mdsc->caps_total_count++; mdsc 338 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 340 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 341 fs/ceph/caps.c if (mdsc->caps_avail_count) { mdsc 342 fs/ceph/caps.c BUG_ON(list_empty(&mdsc->caps_list)); mdsc 344 fs/ceph/caps.c mdsc->caps_avail_count--; mdsc 345 fs/ceph/caps.c mdsc->caps_use_count++; mdsc 346 fs/ceph/caps.c cap = list_first_entry(&mdsc->caps_list, mdsc 350 fs/ceph/caps.c BUG_ON(mdsc->caps_total_count != mdsc->caps_use_count + mdsc 351 fs/ceph/caps.c mdsc->caps_reserve_count + mdsc->caps_avail_count); mdsc 353 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 359 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 361 fs/ceph/caps.c ctx, ctx->count, mdsc->caps_total_count, mdsc->caps_use_count, mdsc 362 fs/ceph/caps.c mdsc->caps_reserve_count, mdsc->caps_avail_count); mdsc 364 fs/ceph/caps.c BUG_ON(ctx->count > mdsc->caps_reserve_count); mdsc 365 fs/ceph/caps.c BUG_ON(list_empty(&mdsc->caps_list)); mdsc 369 fs/ceph/caps.c mdsc->caps_reserve_count--; mdsc 370 fs/ceph/caps.c mdsc->caps_use_count++; mdsc 372 fs/ceph/caps.c cap = list_first_entry(&mdsc->caps_list, struct ceph_cap, caps_item); mdsc 375 fs/ceph/caps.c BUG_ON(mdsc->caps_total_count != mdsc->caps_use_count + mdsc 376 fs/ceph/caps.c mdsc->caps_reserve_count + mdsc->caps_avail_count); mdsc 377 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 381 fs/ceph/caps.c void ceph_put_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap) mdsc 383 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 385 fs/ceph/caps.c cap, mdsc->caps_total_count, mdsc->caps_use_count, mdsc 386 fs/ceph/caps.c mdsc->caps_reserve_count, mdsc->caps_avail_count); mdsc 387 fs/ceph/caps.c mdsc->caps_use_count--; mdsc 392 fs/ceph/caps.c if (mdsc->caps_avail_count >= mdsc->caps_reserve_count + mdsc 393 fs/ceph/caps.c mdsc->caps_min_count) { mdsc 394 fs/ceph/caps.c mdsc->caps_total_count--; mdsc 397 fs/ceph/caps.c mdsc->caps_avail_count++; mdsc 398 fs/ceph/caps.c list_add(&cap->caps_item, &mdsc->caps_list); mdsc 401 fs/ceph/caps.c BUG_ON(mdsc->caps_total_count != mdsc->caps_use_count + mdsc 402 fs/ceph/caps.c mdsc->caps_reserve_count + mdsc->caps_avail_count); mdsc 403 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 410 fs/ceph/caps.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 412 fs/ceph/caps.c spin_lock(&mdsc->caps_list_lock); mdsc 415 fs/ceph/caps.c *total = mdsc->caps_total_count; mdsc 417 fs/ceph/caps.c *avail = mdsc->caps_avail_count; mdsc 419 fs/ceph/caps.c *used = mdsc->caps_use_count; mdsc 421 fs/ceph/caps.c *reserved = mdsc->caps_reserve_count; mdsc 423 fs/ceph/caps.c *min = mdsc->caps_min_count; mdsc 425 fs/ceph/caps.c spin_unlock(&mdsc->caps_list_lock); mdsc 489 fs/ceph/caps.c static void __cap_set_timeouts(struct ceph_mds_client *mdsc, mdsc 492 fs/ceph/caps.c struct ceph_mount_options *opt = mdsc->fsc->mount_options; mdsc 510 fs/ceph/caps.c static void __cap_delay_requeue(struct ceph_mds_client *mdsc, mdsc 516 fs/ceph/caps.c if (!mdsc->stopping) { mdsc 517 fs/ceph/caps.c spin_lock(&mdsc->cap_delay_lock); mdsc 524 fs/ceph/caps.c __cap_set_timeouts(mdsc, ci); mdsc 525 fs/ceph/caps.c list_add_tail(&ci->i_cap_delay_list, &mdsc->cap_delay_list); mdsc 527 fs/ceph/caps.c spin_unlock(&mdsc->cap_delay_lock); mdsc 536 fs/ceph/caps.c static void __cap_delay_requeue_front(struct ceph_mds_client *mdsc, mdsc 540 fs/ceph/caps.c spin_lock(&mdsc->cap_delay_lock); mdsc 544 fs/ceph/caps.c list_add(&ci->i_cap_delay_list, &mdsc->cap_delay_list); mdsc 545 fs/ceph/caps.c spin_unlock(&mdsc->cap_delay_lock); mdsc 553 fs/ceph/caps.c static void __cap_delay_cancel(struct ceph_mds_client *mdsc, mdsc 559 fs/ceph/caps.c spin_lock(&mdsc->cap_delay_lock); mdsc 561 fs/ceph/caps.c spin_unlock(&mdsc->cap_delay_lock); mdsc 612 fs/ceph/caps.c struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 688 fs/ceph/caps.c struct ceph_snap_realm *realm = ceph_lookup_snap_realm(mdsc, mdsc 707 fs/ceph/caps.c ceph_put_snap_realm(mdsc, oldrealm); mdsc 728 fs/ceph/caps.c __cap_delay_requeue(mdsc, ci, true); mdsc 1041 fs/ceph/caps.c ceph_put_snap_realm(ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc, mdsc 1055 fs/ceph/caps.c struct ceph_mds_client *mdsc = mdsc 1056 fs/ceph/caps.c ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc; mdsc 1100 fs/ceph/caps.c ceph_put_cap(mdsc, cap); mdsc 1110 fs/ceph/caps.c __cap_delay_cancel(mdsc, ci); mdsc 1269 fs/ceph/caps.c static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap, mdsc 1313 fs/ceph/caps.c __cap_set_timeouts(mdsc, ci); mdsc 1459 fs/ceph/caps.c struct ceph_mds_client *mdsc = session->s_mdsc; mdsc 1483 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 1484 fs/ceph/caps.c capsnap->cap_flush.tid = ++mdsc->last_cap_flush_tid; mdsc 1486 fs/ceph/caps.c &mdsc->cap_flush_list); mdsc 1488 fs/ceph/caps.c oldest_flush_tid = __get_oldest_flush_tid(mdsc); mdsc 1493 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 1552 fs/ceph/caps.c struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 1579 fs/ceph/caps.c mutex_lock(&mdsc->mutex); mdsc 1580 fs/ceph/caps.c session = __ceph_lookup_mds_session(mdsc, mds); mdsc 1581 fs/ceph/caps.c mutex_unlock(&mdsc->mutex); mdsc 1591 fs/ceph/caps.c __kick_flushing_caps(mdsc, session, ci, 0); mdsc 1604 fs/ceph/caps.c spin_lock(&mdsc->snap_flush_lock); mdsc 1606 fs/ceph/caps.c spin_unlock(&mdsc->snap_flush_lock); mdsc 1617 fs/ceph/caps.c struct ceph_mds_client *mdsc = mdsc 1618 fs/ceph/caps.c ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc; mdsc 1639 fs/ceph/caps.c WARN_ON_ONCE(!rwsem_is_locked(&mdsc->snap_rwsem)); mdsc 1646 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 1647 fs/ceph/caps.c list_add(&ci->i_dirty_item, &mdsc->cap_dirty); mdsc 1648 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 1660 fs/ceph/caps.c __cap_delay_requeue(mdsc, ci, true); mdsc 1675 fs/ceph/caps.c static u64 __get_oldest_flush_tid(struct ceph_mds_client *mdsc) mdsc 1677 fs/ceph/caps.c if (!list_empty(&mdsc->cap_flush_list)) { mdsc 1679 fs/ceph/caps.c list_first_entry(&mdsc->cap_flush_list, mdsc 1690 fs/ceph/caps.c static bool __finish_cap_flush(struct ceph_mds_client *mdsc, mdsc 1696 fs/ceph/caps.c if (mdsc) { mdsc 1698 fs/ceph/caps.c if (wake && cf->g_list.prev != &mdsc->cap_flush_list) { mdsc 1727 fs/ceph/caps.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 1749 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 1752 fs/ceph/caps.c cf->tid = ++mdsc->last_cap_flush_tid; mdsc 1753 fs/ceph/caps.c list_add_tail(&cf->g_list, &mdsc->cap_flush_list); mdsc 1754 fs/ceph/caps.c *oldest_flush_tid = __get_oldest_flush_tid(mdsc); mdsc 1758 fs/ceph/caps.c mdsc->num_cap_flushing++; mdsc 1760 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 1821 fs/ceph/caps.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 1837 fs/ceph/caps.c if (mdsc->stopping) mdsc 1847 fs/ceph/caps.c __cap_delay_cancel(mdsc, ci); mdsc 1860 fs/ceph/caps.c if (!mdsc->stopping && inode->i_nlink > 0) { mdsc 1906 fs/ceph/caps.c if ((!no_delay || mdsc->stopping) && mdsc 2018 fs/ceph/caps.c up_read(&mdsc->snap_rwsem); mdsc 2032 fs/ceph/caps.c __kick_flushing_caps(mdsc, session, ci, 0); mdsc 2041 fs/ceph/caps.c if (down_read_trylock(&mdsc->snap_rwsem) == 0) { mdsc 2045 fs/ceph/caps.c down_read(&mdsc->snap_rwsem); mdsc 2059 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 2060 fs/ceph/caps.c oldest_flush_tid = __get_oldest_flush_tid(mdsc); mdsc 2061 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 2068 fs/ceph/caps.c delayed += __send_cap(mdsc, cap, CEPH_CAP_OP_UPDATE, 0, mdsc 2076 fs/ceph/caps.c __cap_delay_requeue(mdsc, ci, false); mdsc 2086 fs/ceph/caps.c up_read(&mdsc->snap_rwsem); mdsc 2094 fs/ceph/caps.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 2123 fs/ceph/caps.c __kick_flushing_caps(mdsc, session, ci, 0); mdsc 2134 fs/ceph/caps.c delayed = __send_cap(mdsc, cap, CEPH_CAP_OP_FLUSH, mdsc 2143 fs/ceph/caps.c __cap_delay_requeue(mdsc, ci, true); mdsc 2295 fs/ceph/caps.c struct ceph_mds_client *mdsc = mdsc 2296 fs/ceph/caps.c ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 2300 fs/ceph/caps.c __cap_delay_requeue_front(mdsc, ci); mdsc 2306 fs/ceph/caps.c static void __kick_flushing_caps(struct ceph_mds_client *mdsc, mdsc 2347 fs/ceph/caps.c ret = __send_cap(mdsc, cap, CEPH_CAP_OP_FLUSH, mdsc 2389 fs/ceph/caps.c void ceph_early_kick_flushing_caps(struct ceph_mds_client *mdsc, mdsc 2398 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 2399 fs/ceph/caps.c oldest_flush_tid = __get_oldest_flush_tid(mdsc); mdsc 2400 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 2427 fs/ceph/caps.c __kick_flushing_caps(mdsc, session, ci, mdsc 2437 fs/ceph/caps.c void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc, mdsc 2446 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 2447 fs/ceph/caps.c oldest_flush_tid = __get_oldest_flush_tid(mdsc); mdsc 2448 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 2460 fs/ceph/caps.c __kick_flushing_caps(mdsc, session, ci, mdsc 2467 fs/ceph/caps.c static void kick_flushing_inode_caps(struct ceph_mds_client *mdsc, mdsc 2481 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 2484 fs/ceph/caps.c oldest_flush_tid = __get_oldest_flush_tid(mdsc); mdsc 2485 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 2487 fs/ceph/caps.c __kick_flushing_caps(mdsc, session, ci, oldest_flush_tid); mdsc 2548 fs/ceph/caps.c struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 2580 fs/ceph/caps.c up_read(&mdsc->snap_rwsem); mdsc 2623 fs/ceph/caps.c if (!down_read_trylock(&mdsc->snap_rwsem)) { mdsc 2634 fs/ceph/caps.c down_read(&mdsc->snap_rwsem); mdsc 2664 fs/ceph/caps.c if (READ_ONCE(mdsc->fsc->mount_state) == mdsc 2687 fs/ceph/caps.c up_read(&mdsc->snap_rwsem); mdsc 3379 fs/ceph/caps.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 3416 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 3419 fs/ceph/caps.c if (__finish_cap_flush(mdsc, NULL, cf)) mdsc 3434 fs/ceph/caps.c mdsc->num_cap_flushing--; mdsc 3451 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 3466 fs/ceph/caps.c wake_up_all(&mdsc->cap_flushing_wq); mdsc 3482 fs/ceph/caps.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 3516 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 3521 fs/ceph/caps.c if (__finish_cap_flush(mdsc, NULL, &capsnap->cap_flush)) mdsc 3524 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 3533 fs/ceph/caps.c wake_up_all(&mdsc->cap_flushing_wq); mdsc 3583 fs/ceph/caps.c struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 3649 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 3652 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 3666 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 3669 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 3680 fs/ceph/caps.c tsession = ceph_mdsc_open_export_target_session(mdsc, target); mdsc 3691 fs/ceph/caps.c new_cap = ceph_get_cap(mdsc, NULL); mdsc 3708 fs/ceph/caps.c ceph_put_cap(mdsc, new_cap); mdsc 3716 fs/ceph/caps.c static void handle_cap_import(struct ceph_mds_client *mdsc, mdsc 3753 fs/ceph/caps.c new_cap = ceph_get_cap(mdsc, NULL); mdsc 3759 fs/ceph/caps.c ceph_put_cap(mdsc, new_cap); mdsc 3804 fs/ceph/caps.c struct ceph_mds_client *mdsc = session->s_mdsc; mdsc 3867 fs/ceph/caps.c struct ceph_osd_client *osdc = &mdsc->fsc->client->osdc; mdsc 3916 fs/ceph/caps.c inode = ceph_find_inode(mdsc->fsc->sb, vino); mdsc 3930 fs/ceph/caps.c cap = ceph_get_cap(mdsc, NULL); mdsc 3958 fs/ceph/caps.c down_write(&mdsc->snap_rwsem); mdsc 3959 fs/ceph/caps.c ceph_update_snap_trace(mdsc, snaptrace, mdsc 3962 fs/ceph/caps.c downgrade_write(&mdsc->snap_rwsem); mdsc 3964 fs/ceph/caps.c down_read(&mdsc->snap_rwsem); mdsc 3966 fs/ceph/caps.c handle_cap_import(mdsc, inode, h, peer, session, mdsc 3971 fs/ceph/caps.c ceph_put_snap_realm(mdsc, realm); mdsc 4025 fs/ceph/caps.c ceph_flush_cap_releases(mdsc, session); mdsc 4037 fs/ceph/caps.c void ceph_check_delayed_caps(struct ceph_mds_client *mdsc) mdsc 4045 fs/ceph/caps.c spin_lock(&mdsc->cap_delay_lock); mdsc 4046 fs/ceph/caps.c if (list_empty(&mdsc->cap_delay_list)) mdsc 4048 fs/ceph/caps.c ci = list_first_entry(&mdsc->cap_delay_list, mdsc 4057 fs/ceph/caps.c spin_unlock(&mdsc->cap_delay_lock); mdsc 4066 fs/ceph/caps.c spin_unlock(&mdsc->cap_delay_lock); mdsc 4072 fs/ceph/caps.c void ceph_flush_dirty_caps(struct ceph_mds_client *mdsc) mdsc 4078 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 4079 fs/ceph/caps.c while (!list_empty(&mdsc->cap_dirty)) { mdsc 4080 fs/ceph/caps.c ci = list_first_entry(&mdsc->cap_dirty, struct ceph_inode_info, mdsc 4085 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 4088 fs/ceph/caps.c spin_lock(&mdsc->cap_dirty_lock); mdsc 4090 fs/ceph/caps.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 4148 fs/ceph/caps.c struct ceph_mds_client *mdsc = mdsc 4149 fs/ceph/caps.c ceph_inode_to_client(inode)->mdsc; mdsc 4150 fs/ceph/caps.c __cap_delay_requeue_front(mdsc, ci); mdsc 28 fs/ceph/debugfs.c if (!fsc->mdsc || !fsc->mdsc->mdsmap) mdsc 30 fs/ceph/debugfs.c mdsmap = fsc->mdsc->mdsmap; mdsc 52 fs/ceph/debugfs.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 59 fs/ceph/debugfs.c mutex_lock(&mdsc->mutex); mdsc 60 fs/ceph/debugfs.c for (rp = rb_first(&mdsc->request_tree); rp; rp = rb_next(rp)) { mdsc 122 fs/ceph/debugfs.c mutex_unlock(&mdsc->mutex); mdsc 140 fs/ceph/debugfs.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 153 fs/ceph/debugfs.c mutex_lock(&mdsc->mutex); mdsc 154 fs/ceph/debugfs.c for (i = 0; i < mdsc->max_sessions; i++) { mdsc 157 fs/ceph/debugfs.c session = __ceph_lookup_mds_session(mdsc, i); mdsc 160 fs/ceph/debugfs.c mutex_unlock(&mdsc->mutex); mdsc 165 fs/ceph/debugfs.c mutex_lock(&mdsc->mutex); mdsc 167 fs/ceph/debugfs.c mutex_unlock(&mdsc->mutex); mdsc 175 fs/ceph/debugfs.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 180 fs/ceph/debugfs.c mutex_lock(&mdsc->mutex); mdsc 189 fs/ceph/debugfs.c for (mds = 0; mds < mdsc->max_sessions; mds++) { mdsc 191 fs/ceph/debugfs.c __ceph_lookup_mds_session(mdsc, mds); mdsc 195 fs/ceph/debugfs.c mutex_unlock(&mdsc->mutex); mdsc 201 fs/ceph/debugfs.c mutex_lock(&mdsc->mutex); mdsc 203 fs/ceph/debugfs.c mutex_unlock(&mdsc->mutex); mdsc 309 fs/ceph/dir.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 380 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); mdsc 417 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 737 fs/ceph/dir.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 774 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); mdsc 787 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 826 fs/ceph/dir.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 848 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); mdsc 865 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, dir, req); mdsc 888 fs/ceph/dir.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 906 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS); mdsc 923 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, dir, req); mdsc 937 fs/ceph/dir.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 969 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); mdsc 986 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, dir, req); mdsc 1005 fs/ceph/dir.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 1014 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LINK, USE_AUTH_MDS); mdsc 1028 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, dir, req); mdsc 1045 fs/ceph/dir.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 1062 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); mdsc 1074 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, dir, req); mdsc 1087 fs/ceph/dir.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 1110 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); mdsc 1130 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, old_dir, req); mdsc 1153 fs/ceph/dir.c struct ceph_mds_client *mdsc; mdsc 1163 fs/ceph/dir.c mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; mdsc 1164 fs/ceph/dir.c spin_lock(&mdsc->dentry_list_lock); mdsc 1165 fs/ceph/dir.c list_move_tail(&di->lease_list, &mdsc->dentry_leases); mdsc 1166 fs/ceph/dir.c spin_unlock(&mdsc->dentry_list_lock); mdsc 1169 fs/ceph/dir.c static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, mdsc 1175 fs/ceph/dir.c list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); mdsc 1187 fs/ceph/dir.c struct ceph_mds_client *mdsc; mdsc 1210 fs/ceph/dir.c mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; mdsc 1211 fs/ceph/dir.c spin_lock(&mdsc->dentry_list_lock); mdsc 1212 fs/ceph/dir.c __dentry_dir_lease_touch(mdsc, di), mdsc 1213 fs/ceph/dir.c spin_unlock(&mdsc->dentry_list_lock); mdsc 1218 fs/ceph/dir.c struct ceph_mds_client *mdsc; mdsc 1224 fs/ceph/dir.c mdsc = ceph_sb_to_client(di->dentry->d_sb)->mdsc; mdsc 1225 fs/ceph/dir.c spin_lock(&mdsc->dentry_list_lock); mdsc 1227 fs/ceph/dir.c spin_unlock(&mdsc->dentry_list_lock); mdsc 1245 fs/ceph/dir.c __dentry_leases_walk(struct ceph_mds_client *mdsc, mdsc 1256 fs/ceph/dir.c list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; mdsc 1257 fs/ceph/dir.c spin_lock(&mdsc->dentry_list_lock); mdsc 1278 fs/ceph/dir.c __dentry_dir_lease_touch(mdsc, di); mdsc 1302 fs/ceph/dir.c spin_unlock(&mdsc->dentry_list_lock); mdsc 1313 fs/ceph/dir.c spin_lock(&mdsc->dentry_list_lock); mdsc 1316 fs/ceph/dir.c &mdsc->dentry_leases); mdsc 1318 fs/ceph/dir.c __dentry_dir_lease_touch(mdsc, di); mdsc 1320 fs/ceph/dir.c spin_unlock(&mdsc->dentry_list_lock); mdsc 1372 fs/ceph/dir.c int ceph_trim_dentries(struct ceph_mds_client *mdsc) mdsc 1378 fs/ceph/dir.c spin_lock(&mdsc->caps_list_lock); mdsc 1379 fs/ceph/dir.c if (mdsc->caps_use_max > 0 && mdsc 1380 fs/ceph/dir.c mdsc->caps_use_count > mdsc->caps_use_max) mdsc 1381 fs/ceph/dir.c count = mdsc->caps_use_count - mdsc->caps_use_max; mdsc 1384 fs/ceph/dir.c spin_unlock(&mdsc->caps_list_lock); mdsc 1388 fs/ceph/dir.c freed = __dentry_leases_walk(mdsc, &lwc, __dentry_lease_check); mdsc 1397 fs/ceph/dir.c lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; mdsc 1398 fs/ceph/dir.c freed +=__dentry_leases_walk(mdsc, &lwc, __dir_lease_check); mdsc 1593 fs/ceph/dir.c struct ceph_mds_client *mdsc = mdsc 1594 fs/ceph/dir.c ceph_sb_to_client(dir->i_sb)->mdsc; mdsc 1604 fs/ceph/dir.c req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); mdsc 1615 fs/ceph/dir.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 125 fs/ceph/export.c struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; mdsc 137 fs/ceph/export.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, mdsc 149 fs/ceph/export.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 188 fs/ceph/export.c struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; mdsc 212 fs/ceph/export.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPINO, mdsc 233 fs/ceph/export.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 290 fs/ceph/export.c struct ceph_mds_client *mdsc = ceph_sb_to_client(sb)->mdsc; mdsc 296 fs/ceph/export.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPPARENT, mdsc 317 fs/ceph/export.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 435 fs/ceph/export.c req = ceph_mdsc_create_request(fsc->mdsc, CEPH_MDS_OP_LSSNAP, mdsc 460 fs/ceph/export.c err = ceph_mdsc_do_request(fsc->mdsc, NULL, req); mdsc 507 fs/ceph/export.c struct ceph_mds_client *mdsc; mdsc 515 fs/ceph/export.c mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 516 fs/ceph/export.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LOOKUPNAME, mdsc 529 fs/ceph/export.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 184 fs/ceph/file.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 192 fs/ceph/file.c req = ceph_mdsc_create_request(mdsc, op, want_auth); mdsc 290 fs/ceph/file.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 331 fs/ceph/file.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 348 fs/ceph/file.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 424 fs/ceph/file.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 442 fs/ceph/file.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 494 fs/ceph/file.c err = ceph_mdsc_do_request(mdsc, mdsc 554 fs/ceph/inode.c struct ceph_mds_client *mdsc = mdsc 555 fs/ceph/inode.c ceph_inode_to_client(inode)->mdsc; mdsc 566 fs/ceph/inode.c ceph_put_snap_realm(mdsc, realm); mdsc 568 fs/ceph/inode.c ceph_put_snapid_map(mdsc, ci->i_snapid_map); mdsc 735 fs/ceph/inode.c struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 758 fs/ceph/inode.c new_cap = ceph_get_cap(mdsc, caps_reservation); mdsc 777 fs/ceph/inode.c ci->i_snapid_map = ceph_get_snapid_map(mdsc, ceph_snap(inode)); mdsc 1032 fs/ceph/inode.c ceph_put_cap(mdsc, new_cap); mdsc 1995 fs/ceph/inode.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 2008 fs/ceph/inode.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETATTR, mdsc 2021 fs/ceph/inode.c if (!down_read_trylock(&mdsc->snap_rwsem)) { mdsc 2023 fs/ceph/inode.c down_read(&mdsc->snap_rwsem); mdsc 2177 fs/ceph/inode.c up_read(&mdsc->snap_rwsem); mdsc 2190 fs/ceph/inode.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 2244 fs/ceph/inode.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 2260 fs/ceph/inode.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, mode); mdsc 2268 fs/ceph/inode.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 37 fs/ceph/ioctl.c static long __validate_layout(struct ceph_mds_client *mdsc, mdsc 50 fs/ceph/ioctl.c mutex_lock(&mdsc->mutex); mdsc 52 fs/ceph/ioctl.c for (i = 0; i < mdsc->mdsmap->m_num_data_pg_pools; i++) mdsc 53 fs/ceph/ioctl.c if (mdsc->mdsmap->m_data_pg_pools[i] == l->data_pool) { mdsc 57 fs/ceph/ioctl.c mutex_unlock(&mdsc->mutex); mdsc 67 fs/ceph/ioctl.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 103 fs/ceph/ioctl.c err = __validate_layout(mdsc, &nl); mdsc 107 fs/ceph/ioctl.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETLAYOUT, mdsc 125 fs/ceph/ioctl.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 142 fs/ceph/ioctl.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 148 fs/ceph/ioctl.c err = __validate_layout(mdsc, &l); mdsc 152 fs/ceph/ioctl.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETDIRLAYOUT, mdsc 170 fs/ceph/ioctl.c err = ceph_mdsc_do_request(mdsc, inode, req); mdsc 13 fs/ceph/locks.c static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, mdsc 66 fs/ceph/locks.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 86 fs/ceph/locks.c req = ceph_mdsc_create_request(mdsc, operation, USE_AUTH_MDS); mdsc 117 fs/ceph/locks.c err = ceph_mdsc_do_request(mdsc, inode, req); mdsc 144 fs/ceph/locks.c static int ceph_lock_wait_for_completion(struct ceph_mds_client *mdsc, mdsc 167 fs/ceph/locks.c mutex_lock(&mdsc->mutex); mdsc 186 fs/ceph/locks.c mutex_unlock(&mdsc->mutex); mdsc 190 fs/ceph/locks.c intr_req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETFILELOCK, mdsc 203 fs/ceph/locks.c err = ceph_mdsc_do_request(mdsc, inode, intr_req); mdsc 58 fs/ceph/mds_client.c static void __wake_requests(struct ceph_mds_client *mdsc, mdsc 566 fs/ceph/mds_client.c struct ceph_mds_session *__ceph_lookup_mds_session(struct ceph_mds_client *mdsc, mdsc 569 fs/ceph/mds_client.c if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) mdsc 571 fs/ceph/mds_client.c return get_session(mdsc->sessions[mds]); mdsc 574 fs/ceph/mds_client.c static bool __have_session(struct ceph_mds_client *mdsc, int mds) mdsc 576 fs/ceph/mds_client.c if (mds >= mdsc->max_sessions || !mdsc->sessions[mds]) mdsc 582 fs/ceph/mds_client.c static int __verify_registered_session(struct ceph_mds_client *mdsc, mdsc 585 fs/ceph/mds_client.c if (s->s_mds >= mdsc->max_sessions || mdsc 586 fs/ceph/mds_client.c mdsc->sessions[s->s_mds] != s) mdsc 595 fs/ceph/mds_client.c static struct ceph_mds_session *register_session(struct ceph_mds_client *mdsc, mdsc 600 fs/ceph/mds_client.c if (mds >= mdsc->mdsmap->m_num_mds) mdsc 607 fs/ceph/mds_client.c if (mds >= mdsc->max_sessions) { mdsc 615 fs/ceph/mds_client.c if (mdsc->sessions) { mdsc 616 fs/ceph/mds_client.c memcpy(sa, mdsc->sessions, mdsc 617 fs/ceph/mds_client.c mdsc->max_sessions * sizeof(void *)); mdsc 618 fs/ceph/mds_client.c kfree(mdsc->sessions); mdsc 620 fs/ceph/mds_client.c mdsc->sessions = sa; mdsc 621 fs/ceph/mds_client.c mdsc->max_sessions = newmax; mdsc 625 fs/ceph/mds_client.c s->s_mdsc = mdsc; mdsc 632 fs/ceph/mds_client.c ceph_con_init(&s->s_con, s, &mds_con_ops, &mdsc->fsc->client->msgr); mdsc 654 fs/ceph/mds_client.c mdsc->sessions[mds] = s; mdsc 655 fs/ceph/mds_client.c atomic_inc(&mdsc->num_sessions); mdsc 659 fs/ceph/mds_client.c ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); mdsc 671 fs/ceph/mds_client.c static void __unregister_session(struct ceph_mds_client *mdsc, mdsc 675 fs/ceph/mds_client.c BUG_ON(mdsc->sessions[s->s_mds] != s); mdsc 676 fs/ceph/mds_client.c mdsc->sessions[s->s_mds] = NULL; mdsc 680 fs/ceph/mds_client.c atomic_dec(&mdsc->num_sessions); mdsc 749 fs/ceph/mds_client.c lookup_get_request(struct ceph_mds_client *mdsc, u64 tid) mdsc 753 fs/ceph/mds_client.c req = lookup_request(&mdsc->request_tree, tid); mdsc 766 fs/ceph/mds_client.c static void __register_request(struct ceph_mds_client *mdsc, mdsc 772 fs/ceph/mds_client.c req->r_tid = ++mdsc->last_tid; mdsc 774 fs/ceph/mds_client.c ret = ceph_reserve_caps(mdsc, &req->r_caps_reservation, mdsc 786 fs/ceph/mds_client.c insert_request(&mdsc->request_tree, req); mdsc 791 fs/ceph/mds_client.c if (mdsc->oldest_tid == 0 && req->r_op != CEPH_MDS_OP_SETFILELOCK) mdsc 792 fs/ceph/mds_client.c mdsc->oldest_tid = req->r_tid; mdsc 800 fs/ceph/mds_client.c static void __unregister_request(struct ceph_mds_client *mdsc, mdsc 808 fs/ceph/mds_client.c if (req->r_tid == mdsc->oldest_tid) { mdsc 810 fs/ceph/mds_client.c mdsc->oldest_tid = 0; mdsc 815 fs/ceph/mds_client.c mdsc->oldest_tid = next_req->r_tid; mdsc 822 fs/ceph/mds_client.c erase_request(&mdsc->request_tree, req); mdsc 880 fs/ceph/mds_client.c static int __choose_mds(struct ceph_mds_client *mdsc, mdsc 896 fs/ceph/mds_client.c (__have_session(mdsc, req->r_resend_mds) || mdsc 897 fs/ceph/mds_client.c ceph_mdsmap_get_state(mdsc->mdsmap, req->r_resend_mds) > 0)) { mdsc 927 fs/ceph/mds_client.c if (!dir || dir->i_sb != mdsc->fsc->sb) { mdsc 976 fs/ceph/mds_client.c if (ceph_mdsmap_get_state(mdsc->mdsmap, mds) >= mdsc 991 fs/ceph/mds_client.c if (ceph_mdsmap_get_state(mdsc->mdsmap, mds) >= mdsc 1021 fs/ceph/mds_client.c mds = ceph_mdsmap_get_random_mds(mdsc->mdsmap); mdsc 1073 fs/ceph/mds_client.c static struct ceph_msg *create_session_open_msg(struct ceph_mds_client *mdsc, u64 seq) mdsc 1080 fs/ceph/mds_client.c struct ceph_options *opt = mdsc->fsc->client->options; mdsc 1081 fs/ceph/mds_client.c struct ceph_mount_options *fsopt = mdsc->fsc->mount_options; mdsc 1085 fs/ceph/mds_client.c {"hostname", mdsc->nodename}, mdsc 1156 fs/ceph/mds_client.c static int __open_session(struct ceph_mds_client *mdsc, mdsc 1164 fs/ceph/mds_client.c mstate = ceph_mdsmap_get_state(mdsc->mdsmap, mds); mdsc 1171 fs/ceph/mds_client.c msg = create_session_open_msg(mdsc, session->s_seq); mdsc 1184 fs/ceph/mds_client.c __open_export_target_session(struct ceph_mds_client *mdsc, int target) mdsc 1188 fs/ceph/mds_client.c session = __ceph_lookup_mds_session(mdsc, target); mdsc 1190 fs/ceph/mds_client.c session = register_session(mdsc, target); mdsc 1196 fs/ceph/mds_client.c __open_session(mdsc, session); mdsc 1202 fs/ceph/mds_client.c ceph_mdsc_open_export_target_session(struct ceph_mds_client *mdsc, int target) mdsc 1208 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 1209 fs/ceph/mds_client.c session = __open_export_target_session(mdsc, target); mdsc 1210 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 1215 fs/ceph/mds_client.c static void __open_export_target_sessions(struct ceph_mds_client *mdsc, mdsc 1222 fs/ceph/mds_client.c if (mds >= mdsc->mdsmap->m_num_mds) mdsc 1225 fs/ceph/mds_client.c mi = &mdsc->mdsmap->m_info[mds]; mdsc 1230 fs/ceph/mds_client.c ts = __open_export_target_session(mdsc, mi->export_targets[i]); mdsc 1236 fs/ceph/mds_client.c void ceph_mdsc_open_export_target_sessions(struct ceph_mds_client *mdsc, mdsc 1239 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 1240 fs/ceph/mds_client.c __open_export_target_sessions(mdsc, session); mdsc 1241 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 1258 fs/ceph/mds_client.c static void dispose_cap_releases(struct ceph_mds_client *mdsc, mdsc 1266 fs/ceph/mds_client.c ceph_put_cap(mdsc, cap); mdsc 1270 fs/ceph/mds_client.c static void cleanup_session_requests(struct ceph_mds_client *mdsc, mdsc 1278 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 1294 fs/ceph/mds_client.c __unregister_request(mdsc, req); mdsc 1297 fs/ceph/mds_client.c p = rb_first(&mdsc->request_tree); mdsc 1305 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 1397 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 1412 fs/ceph/mds_client.c spin_lock(&mdsc->cap_dirty_lock); mdsc 1433 fs/ceph/mds_client.c mdsc->num_cap_flushing--; mdsc 1436 fs/ceph/mds_client.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 1491 fs/ceph/mds_client.c wake_up_all(&fsc->mdsc->cap_flushing_wq); mdsc 1583 fs/ceph/mds_client.c static int send_renew_caps(struct ceph_mds_client *mdsc, mdsc 1596 fs/ceph/mds_client.c state = ceph_mdsmap_get_state(mdsc->mdsmap, session->s_mds); mdsc 1613 fs/ceph/mds_client.c static int send_flushmsg_ack(struct ceph_mds_client *mdsc, mdsc 1633 fs/ceph/mds_client.c static void renewed_caps(struct ceph_mds_client *mdsc, mdsc 1643 fs/ceph/mds_client.c mdsc->mdsmap->m_session_timeout*HZ; mdsc 1665 fs/ceph/mds_client.c static int request_close_session(struct ceph_mds_client *mdsc, mdsc 1683 fs/ceph/mds_client.c static int __close_session(struct ceph_mds_client *mdsc, mdsc 1689 fs/ceph/mds_client.c return request_close_session(mdsc, session); mdsc 1797 fs/ceph/mds_client.c int ceph_trim_caps(struct ceph_mds_client *mdsc, mdsc 1814 fs/ceph/mds_client.c ceph_flush_cap_releases(mdsc, session); mdsc 1818 fs/ceph/mds_client.c static int check_caps_flush(struct ceph_mds_client *mdsc, mdsc 1823 fs/ceph/mds_client.c spin_lock(&mdsc->cap_dirty_lock); mdsc 1824 fs/ceph/mds_client.c if (!list_empty(&mdsc->cap_flush_list)) { mdsc 1826 fs/ceph/mds_client.c list_first_entry(&mdsc->cap_flush_list, mdsc 1834 fs/ceph/mds_client.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 1843 fs/ceph/mds_client.c static void wait_caps_flush(struct ceph_mds_client *mdsc, mdsc 1848 fs/ceph/mds_client.c wait_event(mdsc->cap_flushing_wq, mdsc 1849 fs/ceph/mds_client.c check_caps_flush(mdsc, want_flush_tid)); mdsc 1857 fs/ceph/mds_client.c static void ceph_send_cap_releases(struct ceph_mds_client *mdsc, mdsc 1863 fs/ceph/mds_client.c struct ceph_osd_client *osdc = &mdsc->fsc->client->osdc; mdsc 1909 fs/ceph/mds_client.c ceph_put_cap(mdsc, cap); mdsc 1964 fs/ceph/mds_client.c void ceph_flush_cap_releases(struct ceph_mds_client *mdsc, mdsc 1967 fs/ceph/mds_client.c if (mdsc->stopping) mdsc 1971 fs/ceph/mds_client.c if (queue_work(mdsc->fsc->cap_wq, mdsc 1995 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = mdsc 1997 fs/ceph/mds_client.c int ret = ceph_trim_dentries(mdsc); mdsc 1999 fs/ceph/mds_client.c ceph_queue_cap_reclaim_work(mdsc); mdsc 2002 fs/ceph/mds_client.c void ceph_queue_cap_reclaim_work(struct ceph_mds_client *mdsc) mdsc 2004 fs/ceph/mds_client.c if (mdsc->stopping) mdsc 2007 fs/ceph/mds_client.c if (queue_work(mdsc->fsc->cap_wq, &mdsc->cap_reclaim_work)) { mdsc 2014 fs/ceph/mds_client.c void ceph_reclaim_caps_nr(struct ceph_mds_client *mdsc, int nr) mdsc 2019 fs/ceph/mds_client.c val = atomic_add_return(nr, &mdsc->cap_reclaim_pending); mdsc 2021 fs/ceph/mds_client.c atomic_set(&mdsc->cap_reclaim_pending, 0); mdsc 2022 fs/ceph/mds_client.c ceph_queue_cap_reclaim_work(mdsc); mdsc 2071 fs/ceph/mds_client.c ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode) mdsc 2080 fs/ceph/mds_client.c req->r_mdsc = mdsc; mdsc 2094 fs/ceph/mds_client.c req->r_stamp = timespec64_trunc(ts, mdsc->fsc->sb->s_time_gran); mdsc 2106 fs/ceph/mds_client.c static struct ceph_mds_request *__get_oldest_req(struct ceph_mds_client *mdsc) mdsc 2108 fs/ceph/mds_client.c if (RB_EMPTY_ROOT(&mdsc->request_tree)) mdsc 2110 fs/ceph/mds_client.c return rb_entry(rb_first(&mdsc->request_tree), mdsc 2114 fs/ceph/mds_client.c static inline u64 __get_oldest_tid(struct ceph_mds_client *mdsc) mdsc 2116 fs/ceph/mds_client.c return mdsc->oldest_tid; mdsc 2284 fs/ceph/mds_client.c static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, mdsc 2346 fs/ceph/mds_client.c head->mdsmap_epoch = cpu_to_le32(mdsc->mdsmap->m_epoch); mdsc 2420 fs/ceph/mds_client.c static void complete_request(struct ceph_mds_client *mdsc, mdsc 2424 fs/ceph/mds_client.c req->r_callback(mdsc, req); mdsc 2431 fs/ceph/mds_client.c static int __prepare_send_request(struct ceph_mds_client *mdsc, mdsc 2492 fs/ceph/mds_client.c msg = create_request_message(mdsc, req, mds, drop_cap_releases); mdsc 2500 fs/ceph/mds_client.c rhead->oldest_client_tid = cpu_to_le64(__get_oldest_tid(mdsc)); mdsc 2517 fs/ceph/mds_client.c static void __do_request(struct ceph_mds_client *mdsc, mdsc 2526 fs/ceph/mds_client.c __unregister_request(mdsc, req); mdsc 2536 fs/ceph/mds_client.c if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) { mdsc 2541 fs/ceph/mds_client.c if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_MOUNTING) { mdsc 2542 fs/ceph/mds_client.c if (mdsc->mdsmap_err) { mdsc 2543 fs/ceph/mds_client.c err = mdsc->mdsmap_err; mdsc 2547 fs/ceph/mds_client.c if (mdsc->mdsmap->m_epoch == 0) { mdsc 2549 fs/ceph/mds_client.c list_add(&req->r_wait, &mdsc->waiting_for_map); mdsc 2552 fs/ceph/mds_client.c if (!(mdsc->fsc->mount_options->flags & mdsc 2554 fs/ceph/mds_client.c !ceph_mdsmap_is_cluster_available(mdsc->mdsmap)) { mdsc 2562 fs/ceph/mds_client.c mds = __choose_mds(mdsc, req); mdsc 2564 fs/ceph/mds_client.c ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) { mdsc 2566 fs/ceph/mds_client.c list_add(&req->r_wait, &mdsc->waiting_for_map); mdsc 2571 fs/ceph/mds_client.c session = __ceph_lookup_mds_session(mdsc, mds); mdsc 2573 fs/ceph/mds_client.c session = register_session(mdsc, mds); mdsc 2591 fs/ceph/mds_client.c __open_session(mdsc, session); mdsc 2602 fs/ceph/mds_client.c err = __prepare_send_request(mdsc, req, mds, false); mdsc 2614 fs/ceph/mds_client.c complete_request(mdsc, req); mdsc 2615 fs/ceph/mds_client.c __unregister_request(mdsc, req); mdsc 2623 fs/ceph/mds_client.c static void __wake_requests(struct ceph_mds_client *mdsc, mdsc 2636 fs/ceph/mds_client.c __do_request(mdsc, req); mdsc 2644 fs/ceph/mds_client.c static void kick_requests(struct ceph_mds_client *mdsc, int mds) mdsc 2647 fs/ceph/mds_client.c struct rb_node *p = rb_first(&mdsc->request_tree); mdsc 2661 fs/ceph/mds_client.c __do_request(mdsc, req); mdsc 2666 fs/ceph/mds_client.c int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, struct inode *dir, mdsc 2683 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 2684 fs/ceph/mds_client.c __register_request(mdsc, req, dir); mdsc 2685 fs/ceph/mds_client.c __do_request(mdsc, req); mdsc 2687 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2691 fs/ceph/mds_client.c static int ceph_mdsc_wait_request(struct ceph_mds_client *mdsc, mdsc 2699 fs/ceph/mds_client.c err = req->r_wait_for_completion(mdsc, req); mdsc 2712 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 2737 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2745 fs/ceph/mds_client.c int ceph_mdsc_do_request(struct ceph_mds_client *mdsc, mdsc 2754 fs/ceph/mds_client.c err = ceph_mdsc_submit_request(mdsc, dir, req); mdsc 2756 fs/ceph/mds_client.c err = ceph_mdsc_wait_request(mdsc, req); mdsc 2790 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = session->s_mdsc; mdsc 2807 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 2808 fs/ceph/mds_client.c req = lookup_get_request(mdsc, tid); mdsc 2811 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2821 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2830 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2836 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2855 fs/ceph/mds_client.c __do_request(mdsc, req); mdsc 2856 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2859 fs/ceph/mds_client.c int mds = __choose_mds(mdsc, req); mdsc 2862 fs/ceph/mds_client.c __do_request(mdsc, req); mdsc 2863 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2873 fs/ceph/mds_client.c __unregister_request(mdsc, req); mdsc 2886 fs/ceph/mds_client.c if (mdsc->stopping && !__get_oldest_req(mdsc)) mdsc 2887 fs/ceph/mds_client.c complete_all(&mdsc->safe_umount_waiters); mdsc 2888 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2910 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2922 fs/ceph/mds_client.c down_write(&mdsc->snap_rwsem); mdsc 2923 fs/ceph/mds_client.c ceph_update_snap_trace(mdsc, rinfo->snapblob, mdsc 2927 fs/ceph/mds_client.c downgrade_write(&mdsc->snap_rwsem); mdsc 2929 fs/ceph/mds_client.c down_read(&mdsc->snap_rwsem); mdsc 2935 fs/ceph/mds_client.c err = ceph_fill_trace(mdsc->fsc->sb, req); mdsc 2944 fs/ceph/mds_client.c up_read(&mdsc->snap_rwsem); mdsc 2946 fs/ceph/mds_client.c ceph_put_snap_realm(mdsc, realm); mdsc 2959 fs/ceph/mds_client.c ceph_unreserve_caps(mdsc, &req->r_caps_reservation); mdsc 2962 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 2973 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 2978 fs/ceph/mds_client.c complete_request(mdsc, req); mdsc 2989 fs/ceph/mds_client.c static void handle_forward(struct ceph_mds_client *mdsc, mdsc 3005 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 3006 fs/ceph/mds_client.c req = lookup_get_request(mdsc, tid); mdsc 3014 fs/ceph/mds_client.c __unregister_request(mdsc, req); mdsc 3027 fs/ceph/mds_client.c __do_request(mdsc, req); mdsc 3031 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 3068 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = session->s_mdsc; mdsc 3098 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 3101 fs/ceph/mds_client.c __unregister_session(mdsc, session); mdsc 3104 fs/ceph/mds_client.c session->s_ttl = jiffies + HZ*mdsc->mdsmap->m_session_autoclose; mdsc 3105 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 3124 fs/ceph/mds_client.c renewed_caps(mdsc, session, 0); mdsc 3126 fs/ceph/mds_client.c if (mdsc->stopping) mdsc 3127 fs/ceph/mds_client.c __close_session(mdsc, session); mdsc 3132 fs/ceph/mds_client.c renewed_caps(mdsc, session, 1); mdsc 3138 fs/ceph/mds_client.c cleanup_session_requests(mdsc, session); mdsc 3141 fs/ceph/mds_client.c wake_up_all(&mdsc->session_close_wq); mdsc 3151 fs/ceph/mds_client.c send_renew_caps(mdsc, session); mdsc 3155 fs/ceph/mds_client.c ceph_trim_caps(mdsc, session, le32_to_cpu(h->max_caps)); mdsc 3159 fs/ceph/mds_client.c send_flushmsg_ack(mdsc, session, seq); mdsc 3174 fs/ceph/mds_client.c cleanup_session_requests(mdsc, session); mdsc 3177 fs/ceph/mds_client.c mdsc->fsc->blacklisted = true; mdsc 3188 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 3189 fs/ceph/mds_client.c __wake_requests(mdsc, &session->s_waiting); mdsc 3191 fs/ceph/mds_client.c kick_requests(mdsc, mds); mdsc 3192 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 3209 fs/ceph/mds_client.c static void replay_unsafe_requests(struct ceph_mds_client *mdsc, mdsc 3218 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 3220 fs/ceph/mds_client.c err = __prepare_send_request(mdsc, req, session->s_mds, true); mdsc 3231 fs/ceph/mds_client.c p = rb_first(&mdsc->request_tree); mdsc 3241 fs/ceph/mds_client.c err = __prepare_send_request(mdsc, req, mdsc 3249 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 3502 fs/ceph/mds_client.c static int encode_snap_realms(struct ceph_mds_client *mdsc, mdsc 3510 fs/ceph/mds_client.c err = ceph_pagelist_encode_32(pagelist, mdsc->num_snap_realms); mdsc 3520 fs/ceph/mds_client.c for (p = rb_first(&mdsc->snap_realms); p; p = rb_next(p)) { mdsc 3574 fs/ceph/mds_client.c static void send_mds_reconnect(struct ceph_mds_client *mdsc, mdsc 3618 fs/ceph/mds_client.c dispose_cap_releases(mdsc, &dispose); mdsc 3621 fs/ceph/mds_client.c if (mdsc->fsc->sb->s_root) mdsc 3622 fs/ceph/mds_client.c shrink_dcache_parent(mdsc->fsc->sb->s_root); mdsc 3627 fs/ceph/mds_client.c ceph_mdsmap_get_addr(mdsc->mdsmap, mds)); mdsc 3630 fs/ceph/mds_client.c replay_unsafe_requests(mdsc, session); mdsc 3632 fs/ceph/mds_client.c ceph_early_kick_flushing_caps(mdsc, session); mdsc 3634 fs/ceph/mds_client.c down_read(&mdsc->snap_rwsem); mdsc 3660 fs/ceph/mds_client.c if (mdsc->num_snap_realms) { mdsc 3663 fs/ceph/mds_client.c mdsc->num_snap_realms * mdsc 3669 fs/ceph/mds_client.c total_len += mdsc->num_snap_realms * mdsc 3686 fs/ceph/mds_client.c err = encode_snap_realms(mdsc, &recon_state); mdsc 3702 fs/ceph/mds_client.c WARN_ON(recon_state.nr_realms != mdsc->num_snap_realms); mdsc 3721 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 3722 fs/ceph/mds_client.c __wake_requests(mdsc, &session->s_waiting); mdsc 3723 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 3725 fs/ceph/mds_client.c up_read(&mdsc->snap_rwsem); mdsc 3731 fs/ceph/mds_client.c up_read(&mdsc->snap_rwsem); mdsc 3747 fs/ceph/mds_client.c static void check_new_map(struct ceph_mds_client *mdsc, mdsc 3758 fs/ceph/mds_client.c for (i = 0; i < oldmap->m_num_mds && i < mdsc->max_sessions; i++) { mdsc 3759 fs/ceph/mds_client.c if (!mdsc->sessions[i]) mdsc 3761 fs/ceph/mds_client.c s = mdsc->sessions[i]; mdsc 3775 fs/ceph/mds_client.c __unregister_session(mdsc, s); mdsc 3776 fs/ceph/mds_client.c __wake_requests(mdsc, &s->s_waiting); mdsc 3777 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 3780 fs/ceph/mds_client.c cleanup_session_requests(mdsc, s); mdsc 3786 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 3787 fs/ceph/mds_client.c kick_requests(mdsc, i); mdsc 3795 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 3797 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 3810 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 3811 fs/ceph/mds_client.c send_mds_reconnect(mdsc, s); mdsc 3812 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 3823 fs/ceph/mds_client.c kick_requests(mdsc, i); mdsc 3824 fs/ceph/mds_client.c ceph_kick_flushing_caps(mdsc, s); mdsc 3829 fs/ceph/mds_client.c for (i = 0; i < newmap->m_num_mds && i < mdsc->max_sessions; i++) { mdsc 3830 fs/ceph/mds_client.c s = mdsc->sessions[i]; mdsc 3840 fs/ceph/mds_client.c __open_export_target_sessions(mdsc, s); mdsc 3862 fs/ceph/mds_client.c static void handle_lease(struct ceph_mds_client *mdsc, mdsc 3866 fs/ceph/mds_client.c struct super_block *sb = mdsc->fsc->sb; mdsc 4009 fs/ceph/mds_client.c static void lock_unlock_sessions(struct ceph_mds_client *mdsc) mdsc 4013 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4014 fs/ceph/mds_client.c for (i = 0; i < mdsc->max_sessions; i++) { mdsc 4015 fs/ceph/mds_client.c struct ceph_mds_session *s = __ceph_lookup_mds_session(mdsc, i); mdsc 4018 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4022 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4024 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4027 fs/ceph/mds_client.c static void maybe_recover_session(struct ceph_mds_client *mdsc) mdsc 4029 fs/ceph/mds_client.c struct ceph_fs_client *fsc = mdsc->fsc; mdsc 4052 fs/ceph/mds_client.c static void schedule_delayed(struct ceph_mds_client *mdsc) mdsc 4056 fs/ceph/mds_client.c schedule_delayed_work(&mdsc->delayed_work, hz); mdsc 4062 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = mdsc 4069 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4070 fs/ceph/mds_client.c renew_interval = mdsc->mdsmap->m_session_timeout >> 2; mdsc 4072 fs/ceph/mds_client.c mdsc->last_renew_caps); mdsc 4074 fs/ceph/mds_client.c mdsc->last_renew_caps = jiffies; mdsc 4076 fs/ceph/mds_client.c for (i = 0; i < mdsc->max_sessions; i++) { mdsc 4077 fs/ceph/mds_client.c struct ceph_mds_session *s = __ceph_lookup_mds_session(mdsc, i); mdsc 4083 fs/ceph/mds_client.c request_close_session(mdsc, s); mdsc 4100 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4104 fs/ceph/mds_client.c send_renew_caps(mdsc, s); mdsc 4109 fs/ceph/mds_client.c ceph_send_cap_releases(mdsc, s); mdsc 4113 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4115 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4117 fs/ceph/mds_client.c ceph_check_delayed_caps(mdsc); mdsc 4119 fs/ceph/mds_client.c ceph_queue_cap_reclaim_work(mdsc); mdsc 4121 fs/ceph/mds_client.c ceph_trim_snapid_map(mdsc); mdsc 4123 fs/ceph/mds_client.c maybe_recover_session(mdsc); mdsc 4125 fs/ceph/mds_client.c schedule_delayed(mdsc); mdsc 4131 fs/ceph/mds_client.c struct ceph_mds_client *mdsc; mdsc 4133 fs/ceph/mds_client.c mdsc = kzalloc(sizeof(struct ceph_mds_client), GFP_NOFS); mdsc 4134 fs/ceph/mds_client.c if (!mdsc) mdsc 4136 fs/ceph/mds_client.c mdsc->fsc = fsc; mdsc 4137 fs/ceph/mds_client.c mutex_init(&mdsc->mutex); mdsc 4138 fs/ceph/mds_client.c mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS); mdsc 4139 fs/ceph/mds_client.c if (!mdsc->mdsmap) { mdsc 4140 fs/ceph/mds_client.c kfree(mdsc); mdsc 4144 fs/ceph/mds_client.c fsc->mdsc = mdsc; mdsc 4145 fs/ceph/mds_client.c init_completion(&mdsc->safe_umount_waiters); mdsc 4146 fs/ceph/mds_client.c init_waitqueue_head(&mdsc->session_close_wq); mdsc 4147 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->waiting_for_map); mdsc 4148 fs/ceph/mds_client.c mdsc->sessions = NULL; mdsc 4149 fs/ceph/mds_client.c atomic_set(&mdsc->num_sessions, 0); mdsc 4150 fs/ceph/mds_client.c mdsc->max_sessions = 0; mdsc 4151 fs/ceph/mds_client.c mdsc->stopping = 0; mdsc 4152 fs/ceph/mds_client.c atomic64_set(&mdsc->quotarealms_count, 0); mdsc 4153 fs/ceph/mds_client.c mdsc->quotarealms_inodes = RB_ROOT; mdsc 4154 fs/ceph/mds_client.c mutex_init(&mdsc->quotarealms_inodes_mutex); mdsc 4155 fs/ceph/mds_client.c mdsc->last_snap_seq = 0; mdsc 4156 fs/ceph/mds_client.c init_rwsem(&mdsc->snap_rwsem); mdsc 4157 fs/ceph/mds_client.c mdsc->snap_realms = RB_ROOT; mdsc 4158 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->snap_empty); mdsc 4159 fs/ceph/mds_client.c mdsc->num_snap_realms = 0; mdsc 4160 fs/ceph/mds_client.c spin_lock_init(&mdsc->snap_empty_lock); mdsc 4161 fs/ceph/mds_client.c mdsc->last_tid = 0; mdsc 4162 fs/ceph/mds_client.c mdsc->oldest_tid = 0; mdsc 4163 fs/ceph/mds_client.c mdsc->request_tree = RB_ROOT; mdsc 4164 fs/ceph/mds_client.c INIT_DELAYED_WORK(&mdsc->delayed_work, delayed_work); mdsc 4165 fs/ceph/mds_client.c mdsc->last_renew_caps = jiffies; mdsc 4166 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->cap_delay_list); mdsc 4167 fs/ceph/mds_client.c spin_lock_init(&mdsc->cap_delay_lock); mdsc 4168 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->snap_flush_list); mdsc 4169 fs/ceph/mds_client.c spin_lock_init(&mdsc->snap_flush_lock); mdsc 4170 fs/ceph/mds_client.c mdsc->last_cap_flush_tid = 1; mdsc 4171 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->cap_flush_list); mdsc 4172 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->cap_dirty); mdsc 4173 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->cap_dirty_migrating); mdsc 4174 fs/ceph/mds_client.c mdsc->num_cap_flushing = 0; mdsc 4175 fs/ceph/mds_client.c spin_lock_init(&mdsc->cap_dirty_lock); mdsc 4176 fs/ceph/mds_client.c init_waitqueue_head(&mdsc->cap_flushing_wq); mdsc 4177 fs/ceph/mds_client.c INIT_WORK(&mdsc->cap_reclaim_work, ceph_cap_reclaim_work); mdsc 4178 fs/ceph/mds_client.c atomic_set(&mdsc->cap_reclaim_pending, 0); mdsc 4180 fs/ceph/mds_client.c spin_lock_init(&mdsc->dentry_list_lock); mdsc 4181 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->dentry_leases); mdsc 4182 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->dentry_dir_leases); mdsc 4184 fs/ceph/mds_client.c ceph_caps_init(mdsc); mdsc 4185 fs/ceph/mds_client.c ceph_adjust_caps_max_min(mdsc, fsc->mount_options); mdsc 4187 fs/ceph/mds_client.c spin_lock_init(&mdsc->snapid_map_lock); mdsc 4188 fs/ceph/mds_client.c mdsc->snapid_map_tree = RB_ROOT; mdsc 4189 fs/ceph/mds_client.c INIT_LIST_HEAD(&mdsc->snapid_map_lru); mdsc 4191 fs/ceph/mds_client.c init_rwsem(&mdsc->pool_perm_rwsem); mdsc 4192 fs/ceph/mds_client.c mdsc->pool_perm_tree = RB_ROOT; mdsc 4194 fs/ceph/mds_client.c strscpy(mdsc->nodename, utsname()->nodename, mdsc 4195 fs/ceph/mds_client.c sizeof(mdsc->nodename)); mdsc 4203 fs/ceph/mds_client.c static void wait_requests(struct ceph_mds_client *mdsc) mdsc 4205 fs/ceph/mds_client.c struct ceph_options *opts = mdsc->fsc->client->options; mdsc 4208 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4209 fs/ceph/mds_client.c if (__get_oldest_req(mdsc)) { mdsc 4210 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4213 fs/ceph/mds_client.c wait_for_completion_timeout(&mdsc->safe_umount_waiters, mdsc 4217 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4218 fs/ceph/mds_client.c while ((req = __get_oldest_req(mdsc))) { mdsc 4222 fs/ceph/mds_client.c __unregister_request(mdsc, req); mdsc 4225 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4233 fs/ceph/mds_client.c void ceph_mdsc_pre_umount(struct ceph_mds_client *mdsc) mdsc 4236 fs/ceph/mds_client.c mdsc->stopping = 1; mdsc 4238 fs/ceph/mds_client.c lock_unlock_sessions(mdsc); mdsc 4239 fs/ceph/mds_client.c ceph_flush_dirty_caps(mdsc); mdsc 4240 fs/ceph/mds_client.c wait_requests(mdsc); mdsc 4248 fs/ceph/mds_client.c ceph_cleanup_quotarealms_inodes(mdsc); mdsc 4254 fs/ceph/mds_client.c static void wait_unsafe_requests(struct ceph_mds_client *mdsc, u64 want_tid) mdsc 4259 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4262 fs/ceph/mds_client.c req = __get_oldest_req(mdsc); mdsc 4276 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4280 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4293 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4297 fs/ceph/mds_client.c void ceph_mdsc_sync(struct ceph_mds_client *mdsc) mdsc 4301 fs/ceph/mds_client.c if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) mdsc 4305 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4306 fs/ceph/mds_client.c want_tid = mdsc->last_tid; mdsc 4307 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4309 fs/ceph/mds_client.c ceph_flush_dirty_caps(mdsc); mdsc 4310 fs/ceph/mds_client.c spin_lock(&mdsc->cap_dirty_lock); mdsc 4311 fs/ceph/mds_client.c want_flush = mdsc->last_cap_flush_tid; mdsc 4312 fs/ceph/mds_client.c if (!list_empty(&mdsc->cap_flush_list)) { mdsc 4314 fs/ceph/mds_client.c list_last_entry(&mdsc->cap_flush_list, mdsc 4318 fs/ceph/mds_client.c spin_unlock(&mdsc->cap_dirty_lock); mdsc 4323 fs/ceph/mds_client.c wait_unsafe_requests(mdsc, want_tid); mdsc 4324 fs/ceph/mds_client.c wait_caps_flush(mdsc, want_flush); mdsc 4330 fs/ceph/mds_client.c static bool done_closing_sessions(struct ceph_mds_client *mdsc, int skipped) mdsc 4332 fs/ceph/mds_client.c if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) mdsc 4334 fs/ceph/mds_client.c return atomic_read(&mdsc->num_sessions) <= skipped; mdsc 4340 fs/ceph/mds_client.c void ceph_mdsc_close_sessions(struct ceph_mds_client *mdsc) mdsc 4342 fs/ceph/mds_client.c struct ceph_options *opts = mdsc->fsc->client->options; mdsc 4350 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4351 fs/ceph/mds_client.c for (i = 0; i < mdsc->max_sessions; i++) { mdsc 4352 fs/ceph/mds_client.c session = __ceph_lookup_mds_session(mdsc, i); mdsc 4355 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4357 fs/ceph/mds_client.c if (__close_session(mdsc, session) <= 0) mdsc 4361 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4363 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4366 fs/ceph/mds_client.c wait_event_timeout(mdsc->session_close_wq, mdsc 4367 fs/ceph/mds_client.c done_closing_sessions(mdsc, skipped), mdsc 4371 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4372 fs/ceph/mds_client.c for (i = 0; i < mdsc->max_sessions; i++) { mdsc 4373 fs/ceph/mds_client.c if (mdsc->sessions[i]) { mdsc 4374 fs/ceph/mds_client.c session = get_session(mdsc->sessions[i]); mdsc 4375 fs/ceph/mds_client.c __unregister_session(mdsc, session); mdsc 4376 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4381 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4384 fs/ceph/mds_client.c WARN_ON(!list_empty(&mdsc->cap_delay_list)); mdsc 4385 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4387 fs/ceph/mds_client.c ceph_cleanup_snapid_map(mdsc); mdsc 4388 fs/ceph/mds_client.c ceph_cleanup_empty_realms(mdsc); mdsc 4390 fs/ceph/mds_client.c cancel_work_sync(&mdsc->cap_reclaim_work); mdsc 4391 fs/ceph/mds_client.c cancel_delayed_work_sync(&mdsc->delayed_work); /* cancel timer */ mdsc 4396 fs/ceph/mds_client.c void ceph_mdsc_force_umount(struct ceph_mds_client *mdsc) mdsc 4403 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4404 fs/ceph/mds_client.c for (mds = 0; mds < mdsc->max_sessions; mds++) { mdsc 4405 fs/ceph/mds_client.c session = __ceph_lookup_mds_session(mdsc, mds); mdsc 4410 fs/ceph/mds_client.c __unregister_session(mdsc, session); mdsc 4411 fs/ceph/mds_client.c __wake_requests(mdsc, &session->s_waiting); mdsc 4412 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4415 fs/ceph/mds_client.c __close_session(mdsc, session); mdsc 4417 fs/ceph/mds_client.c cleanup_session_requests(mdsc, session); mdsc 4423 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4424 fs/ceph/mds_client.c kick_requests(mdsc, mds); mdsc 4426 fs/ceph/mds_client.c __wake_requests(mdsc, &mdsc->waiting_for_map); mdsc 4427 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4430 fs/ceph/mds_client.c static void ceph_mdsc_stop(struct ceph_mds_client *mdsc) mdsc 4433 fs/ceph/mds_client.c cancel_delayed_work_sync(&mdsc->delayed_work); /* cancel timer */ mdsc 4434 fs/ceph/mds_client.c if (mdsc->mdsmap) mdsc 4435 fs/ceph/mds_client.c ceph_mdsmap_destroy(mdsc->mdsmap); mdsc 4436 fs/ceph/mds_client.c kfree(mdsc->sessions); mdsc 4437 fs/ceph/mds_client.c ceph_caps_finalize(mdsc); mdsc 4438 fs/ceph/mds_client.c ceph_pool_perm_destroy(mdsc); mdsc 4443 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 4444 fs/ceph/mds_client.c dout("mdsc_destroy %p\n", mdsc); mdsc 4446 fs/ceph/mds_client.c if (!mdsc) mdsc 4452 fs/ceph/mds_client.c ceph_mdsc_stop(mdsc); mdsc 4454 fs/ceph/mds_client.c fsc->mdsc = NULL; mdsc 4455 fs/ceph/mds_client.c kfree(mdsc); mdsc 4456 fs/ceph/mds_client.c dout("mdsc_destroy %p done\n", mdsc); mdsc 4459 fs/ceph/mds_client.c void ceph_mdsc_handle_fsmap(struct ceph_mds_client *mdsc, struct ceph_msg *msg) mdsc 4461 fs/ceph/mds_client.c struct ceph_fs_client *fsc = mdsc->fsc; mdsc 4529 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4530 fs/ceph/mds_client.c mdsc->mdsmap_err = err; mdsc 4531 fs/ceph/mds_client.c __wake_requests(mdsc, &mdsc->waiting_for_map); mdsc 4532 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4538 fs/ceph/mds_client.c void ceph_mdsc_handle_mdsmap(struct ceph_mds_client *mdsc, struct ceph_msg *msg) mdsc 4550 fs/ceph/mds_client.c if (ceph_check_fsid(mdsc->fsc->client, &fsid) < 0) mdsc 4557 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4558 fs/ceph/mds_client.c if (mdsc->mdsmap && epoch <= mdsc->mdsmap->m_epoch) { mdsc 4560 fs/ceph/mds_client.c epoch, mdsc->mdsmap->m_epoch); mdsc 4561 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4572 fs/ceph/mds_client.c if (mdsc->mdsmap) { mdsc 4573 fs/ceph/mds_client.c oldmap = mdsc->mdsmap; mdsc 4574 fs/ceph/mds_client.c mdsc->mdsmap = newmap; mdsc 4575 fs/ceph/mds_client.c check_new_map(mdsc, newmap, oldmap); mdsc 4578 fs/ceph/mds_client.c mdsc->mdsmap = newmap; /* first mds map */ mdsc 4580 fs/ceph/mds_client.c mdsc->fsc->max_file_size = min((loff_t)mdsc->mdsmap->m_max_file_size, mdsc 4583 fs/ceph/mds_client.c __wake_requests(mdsc, &mdsc->waiting_for_map); mdsc 4584 fs/ceph/mds_client.c ceph_monc_got_map(&mdsc->fsc->client->monc, CEPH_SUB_MDSMAP, mdsc 4585 fs/ceph/mds_client.c mdsc->mdsmap->m_epoch); mdsc 4587 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4588 fs/ceph/mds_client.c schedule_delayed(mdsc); mdsc 4592 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4625 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = s->s_mdsc; mdsc 4628 fs/ceph/mds_client.c send_mds_reconnect(mdsc, s); mdsc 4634 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = s->s_mdsc; mdsc 4637 fs/ceph/mds_client.c mutex_lock(&mdsc->mutex); mdsc 4638 fs/ceph/mds_client.c if (__verify_registered_session(mdsc, s) < 0) { mdsc 4639 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4642 fs/ceph/mds_client.c mutex_unlock(&mdsc->mutex); mdsc 4646 fs/ceph/mds_client.c ceph_mdsc_handle_mdsmap(mdsc, msg); mdsc 4649 fs/ceph/mds_client.c ceph_mdsc_handle_fsmap(mdsc, msg); mdsc 4658 fs/ceph/mds_client.c handle_forward(mdsc, s, msg); mdsc 4664 fs/ceph/mds_client.c ceph_handle_snap(mdsc, s, msg); mdsc 4667 fs/ceph/mds_client.c handle_lease(mdsc, s, msg); mdsc 4670 fs/ceph/mds_client.c ceph_handle_quota(mdsc, s, msg); mdsc 4693 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = s->s_mdsc; mdsc 4694 fs/ceph/mds_client.c struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; mdsc 4721 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = s->s_mdsc; mdsc 4722 fs/ceph/mds_client.c struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; mdsc 4731 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = s->s_mdsc; mdsc 4732 fs/ceph/mds_client.c struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; mdsc 4740 fs/ceph/mds_client.c struct ceph_mds_client *mdsc = s->s_mdsc; mdsc 4741 fs/ceph/mds_client.c struct ceph_auth_client *ac = mdsc->fsc->client->monc.auth; mdsc 4745 fs/ceph/mds_client.c return ceph_monc_validate_auth(&mdsc->fsc->client->monc); mdsc 211 fs/ceph/mds_client.h typedef void (*ceph_mds_request_callback_t) (struct ceph_mds_client *mdsc, mdsc 216 fs/ceph/mds_client.h typedef int (*ceph_mds_request_wait_callback_t) (struct ceph_mds_client *mdsc, mdsc 456 fs/ceph/mds_client.h extern int ceph_send_msg_mds(struct ceph_mds_client *mdsc, mdsc 460 fs/ceph/mds_client.h extern void ceph_mdsc_close_sessions(struct ceph_mds_client *mdsc); mdsc 461 fs/ceph/mds_client.h extern void ceph_mdsc_force_umount(struct ceph_mds_client *mdsc); mdsc 464 fs/ceph/mds_client.h extern void ceph_mdsc_sync(struct ceph_mds_client *mdsc); mdsc 470 fs/ceph/mds_client.h ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode); mdsc 471 fs/ceph/mds_client.h extern int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, mdsc 474 fs/ceph/mds_client.h extern int ceph_mdsc_do_request(struct ceph_mds_client *mdsc, mdsc 489 fs/ceph/mds_client.h extern void ceph_flush_cap_releases(struct ceph_mds_client *mdsc, mdsc 491 fs/ceph/mds_client.h extern void ceph_queue_cap_reclaim_work(struct ceph_mds_client *mdsc); mdsc 492 fs/ceph/mds_client.h extern void ceph_reclaim_caps_nr(struct ceph_mds_client *mdsc, int nr); mdsc 497 fs/ceph/mds_client.h extern void ceph_mdsc_pre_umount(struct ceph_mds_client *mdsc); mdsc 513 fs/ceph/mds_client.h extern void ceph_mdsc_handle_mdsmap(struct ceph_mds_client *mdsc, mdsc 515 fs/ceph/mds_client.h extern void ceph_mdsc_handle_fsmap(struct ceph_mds_client *mdsc, mdsc 519 fs/ceph/mds_client.h ceph_mdsc_open_export_target_session(struct ceph_mds_client *mdsc, int target); mdsc 520 fs/ceph/mds_client.h extern void ceph_mdsc_open_export_target_sessions(struct ceph_mds_client *mdsc, mdsc 523 fs/ceph/mds_client.h extern int ceph_trim_caps(struct ceph_mds_client *mdsc, mdsc 15 fs/ceph/quota.c struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 17 fs/ceph/quota.c atomic64_inc(&mdsc->quotarealms_count); mdsc 19 fs/ceph/quota.c atomic64_dec(&mdsc->quotarealms_count); mdsc 24 fs/ceph/quota.c struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 25 fs/ceph/quota.c struct super_block *sb = mdsc->fsc->sb; mdsc 27 fs/ceph/quota.c if (atomic64_read(&mdsc->quotarealms_count) > 0) mdsc 37 fs/ceph/quota.c void ceph_handle_quota(struct ceph_mds_client *mdsc, mdsc 41 fs/ceph/quota.c struct super_block *sb = mdsc->fsc->sb; mdsc 82 fs/ceph/quota.c find_quotarealm_inode(struct ceph_mds_client *mdsc, u64 ino) mdsc 87 fs/ceph/quota.c mutex_lock(&mdsc->quotarealms_inodes_mutex); mdsc 88 fs/ceph/quota.c node = &(mdsc->quotarealms_inodes.rb_node); mdsc 109 fs/ceph/quota.c rb_insert_color(&qri->node, &mdsc->quotarealms_inodes); mdsc 113 fs/ceph/quota.c mutex_unlock(&mdsc->quotarealms_inodes_mutex); mdsc 126 fs/ceph/quota.c static struct inode *lookup_quotarealm_inode(struct ceph_mds_client *mdsc, mdsc 133 fs/ceph/quota.c qri = find_quotarealm_inode(mdsc, realm->ino); mdsc 174 fs/ceph/quota.c void ceph_cleanup_quotarealms_inodes(struct ceph_mds_client *mdsc) mdsc 183 fs/ceph/quota.c mutex_lock(&mdsc->quotarealms_inodes_mutex); mdsc 184 fs/ceph/quota.c while (!RB_EMPTY_ROOT(&mdsc->quotarealms_inodes)) { mdsc 185 fs/ceph/quota.c node = rb_first(&mdsc->quotarealms_inodes); mdsc 187 fs/ceph/quota.c rb_erase(node, &mdsc->quotarealms_inodes); mdsc 191 fs/ceph/quota.c mutex_unlock(&mdsc->quotarealms_inodes_mutex); mdsc 209 fs/ceph/quota.c static struct ceph_snap_realm *get_quota_realm(struct ceph_mds_client *mdsc, mdsc 223 fs/ceph/quota.c ceph_get_snap_realm(mdsc, realm); mdsc 237 fs/ceph/quota.c up_read(&mdsc->snap_rwsem); mdsc 238 fs/ceph/quota.c in = lookup_quotarealm_inode(mdsc, inode->i_sb, realm); mdsc 239 fs/ceph/quota.c down_read(&mdsc->snap_rwsem); mdsc 242 fs/ceph/quota.c ceph_put_snap_realm(mdsc, realm); mdsc 257 fs/ceph/quota.c ceph_get_snap_realm(mdsc, next); mdsc 258 fs/ceph/quota.c ceph_put_snap_realm(mdsc, realm); mdsc 262 fs/ceph/quota.c ceph_put_snap_realm(mdsc, realm); mdsc 269 fs/ceph/quota.c struct ceph_mds_client *mdsc = ceph_inode_to_client(old)->mdsc; mdsc 280 fs/ceph/quota.c down_read(&mdsc->snap_rwsem); mdsc 281 fs/ceph/quota.c old_realm = get_quota_realm(mdsc, old, true); mdsc 282 fs/ceph/quota.c new_realm = get_quota_realm(mdsc, new, false); mdsc 284 fs/ceph/quota.c up_read(&mdsc->snap_rwsem); mdsc 286 fs/ceph/quota.c ceph_put_snap_realm(mdsc, old_realm); mdsc 290 fs/ceph/quota.c up_read(&mdsc->snap_rwsem); mdsc 293 fs/ceph/quota.c ceph_put_snap_realm(mdsc, old_realm); mdsc 295 fs/ceph/quota.c ceph_put_snap_realm(mdsc, new_realm); mdsc 316 fs/ceph/quota.c struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; mdsc 326 fs/ceph/quota.c down_read(&mdsc->snap_rwsem); mdsc 330 fs/ceph/quota.c ceph_get_snap_realm(mdsc, realm); mdsc 344 fs/ceph/quota.c up_read(&mdsc->snap_rwsem); mdsc 345 fs/ceph/quota.c in = lookup_quotarealm_inode(mdsc, inode->i_sb, realm); mdsc 346 fs/ceph/quota.c down_read(&mdsc->snap_rwsem); mdsc 349 fs/ceph/quota.c ceph_put_snap_realm(mdsc, realm); mdsc 394 fs/ceph/quota.c ceph_get_snap_realm(mdsc, next); mdsc 395 fs/ceph/quota.c ceph_put_snap_realm(mdsc, realm); mdsc 399 fs/ceph/quota.c ceph_put_snap_realm(mdsc, realm); mdsc 400 fs/ceph/quota.c up_read(&mdsc->snap_rwsem); mdsc 480 fs/ceph/quota.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 487 fs/ceph/quota.c down_read(&mdsc->snap_rwsem); mdsc 488 fs/ceph/quota.c realm = get_quota_realm(mdsc, d_inode(fsc->sb->s_root), true); mdsc 489 fs/ceph/quota.c up_read(&mdsc->snap_rwsem); mdsc 516 fs/ceph/quota.c ceph_put_snap_realm(mdsc, realm); mdsc 65 fs/ceph/snap.c void ceph_get_snap_realm(struct ceph_mds_client *mdsc, mdsc 77 fs/ceph/snap.c spin_lock(&mdsc->snap_empty_lock); mdsc 79 fs/ceph/snap.c spin_unlock(&mdsc->snap_empty_lock); mdsc 111 fs/ceph/snap.c struct ceph_mds_client *mdsc, mdsc 128 fs/ceph/snap.c __insert_snap_realm(&mdsc->snap_realms, realm); mdsc 129 fs/ceph/snap.c mdsc->num_snap_realms++; mdsc 140 fs/ceph/snap.c static struct ceph_snap_realm *__lookup_snap_realm(struct ceph_mds_client *mdsc, mdsc 143 fs/ceph/snap.c struct rb_node *n = mdsc->snap_realms.rb_node; mdsc 160 fs/ceph/snap.c struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc, mdsc 164 fs/ceph/snap.c r = __lookup_snap_realm(mdsc, ino); mdsc 166 fs/ceph/snap.c ceph_get_snap_realm(mdsc, r); mdsc 170 fs/ceph/snap.c static void __put_snap_realm(struct ceph_mds_client *mdsc, mdsc 176 fs/ceph/snap.c static void __destroy_snap_realm(struct ceph_mds_client *mdsc, mdsc 181 fs/ceph/snap.c rb_erase(&realm->node, &mdsc->snap_realms); mdsc 182 fs/ceph/snap.c mdsc->num_snap_realms--; mdsc 186 fs/ceph/snap.c __put_snap_realm(mdsc, realm->parent); mdsc 198 fs/ceph/snap.c static void __put_snap_realm(struct ceph_mds_client *mdsc, mdsc 204 fs/ceph/snap.c __destroy_snap_realm(mdsc, realm); mdsc 210 fs/ceph/snap.c void ceph_put_snap_realm(struct ceph_mds_client *mdsc, mdsc 218 fs/ceph/snap.c if (down_write_trylock(&mdsc->snap_rwsem)) { mdsc 219 fs/ceph/snap.c __destroy_snap_realm(mdsc, realm); mdsc 220 fs/ceph/snap.c up_write(&mdsc->snap_rwsem); mdsc 222 fs/ceph/snap.c spin_lock(&mdsc->snap_empty_lock); mdsc 223 fs/ceph/snap.c list_add(&realm->empty_item, &mdsc->snap_empty); mdsc 224 fs/ceph/snap.c spin_unlock(&mdsc->snap_empty_lock); mdsc 235 fs/ceph/snap.c static void __cleanup_empty_realms(struct ceph_mds_client *mdsc) mdsc 239 fs/ceph/snap.c spin_lock(&mdsc->snap_empty_lock); mdsc 240 fs/ceph/snap.c while (!list_empty(&mdsc->snap_empty)) { mdsc 241 fs/ceph/snap.c realm = list_first_entry(&mdsc->snap_empty, mdsc 244 fs/ceph/snap.c spin_unlock(&mdsc->snap_empty_lock); mdsc 245 fs/ceph/snap.c __destroy_snap_realm(mdsc, realm); mdsc 246 fs/ceph/snap.c spin_lock(&mdsc->snap_empty_lock); mdsc 248 fs/ceph/snap.c spin_unlock(&mdsc->snap_empty_lock); mdsc 251 fs/ceph/snap.c void ceph_cleanup_empty_realms(struct ceph_mds_client *mdsc) mdsc 253 fs/ceph/snap.c down_write(&mdsc->snap_rwsem); mdsc 254 fs/ceph/snap.c __cleanup_empty_realms(mdsc); mdsc 255 fs/ceph/snap.c up_write(&mdsc->snap_rwsem); mdsc 266 fs/ceph/snap.c static int adjust_snap_realm_parent(struct ceph_mds_client *mdsc, mdsc 275 fs/ceph/snap.c parent = ceph_lookup_snap_realm(mdsc, parentino); mdsc 277 fs/ceph/snap.c parent = ceph_create_snap_realm(mdsc, parentino); mdsc 286 fs/ceph/snap.c ceph_put_snap_realm(mdsc, realm->parent); mdsc 605 fs/ceph/snap.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 632 fs/ceph/snap.c spin_lock(&mdsc->snap_flush_lock); mdsc 634 fs/ceph/snap.c list_add_tail(&ci->i_snap_flush_item, &mdsc->snap_flush_list); mdsc 635 fs/ceph/snap.c spin_unlock(&mdsc->snap_flush_lock); mdsc 676 fs/ceph/snap.c int ceph_update_snap_trace(struct ceph_mds_client *mdsc, mdsc 701 fs/ceph/snap.c realm = ceph_lookup_snap_realm(mdsc, le64_to_cpu(ri->ino)); mdsc 703 fs/ceph/snap.c realm = ceph_create_snap_realm(mdsc, le64_to_cpu(ri->ino)); mdsc 711 fs/ceph/snap.c err = adjust_snap_realm_parent(mdsc, realm, le64_to_cpu(ri->parent)); mdsc 736 fs/ceph/snap.c if (realm->seq > mdsc->last_snap_seq) mdsc 737 fs/ceph/snap.c mdsc->last_snap_seq = realm->seq; mdsc 759 fs/ceph/snap.c ceph_put_snap_realm(mdsc, realm); mdsc 778 fs/ceph/snap.c ceph_put_snap_realm(mdsc, first_realm); mdsc 780 fs/ceph/snap.c __cleanup_empty_realms(mdsc); mdsc 787 fs/ceph/snap.c ceph_put_snap_realm(mdsc, realm); mdsc 789 fs/ceph/snap.c ceph_put_snap_realm(mdsc, first_realm); mdsc 801 fs/ceph/snap.c static void flush_snaps(struct ceph_mds_client *mdsc) mdsc 808 fs/ceph/snap.c spin_lock(&mdsc->snap_flush_lock); mdsc 809 fs/ceph/snap.c while (!list_empty(&mdsc->snap_flush_list)) { mdsc 810 fs/ceph/snap.c ci = list_first_entry(&mdsc->snap_flush_list, mdsc 814 fs/ceph/snap.c spin_unlock(&mdsc->snap_flush_lock); mdsc 819 fs/ceph/snap.c spin_lock(&mdsc->snap_flush_lock); mdsc 821 fs/ceph/snap.c spin_unlock(&mdsc->snap_flush_lock); mdsc 842 fs/ceph/snap.c void ceph_handle_snap(struct ceph_mds_client *mdsc, mdsc 846 fs/ceph/snap.c struct super_block *sb = mdsc->fsc->sb; mdsc 879 fs/ceph/snap.c down_write(&mdsc->snap_rwsem); mdsc 901 fs/ceph/snap.c realm = ceph_lookup_snap_realm(mdsc, split); mdsc 903 fs/ceph/snap.c realm = ceph_create_snap_realm(mdsc, split); mdsc 959 fs/ceph/snap.c ceph_get_snap_realm(mdsc, realm); mdsc 960 fs/ceph/snap.c ceph_put_snap_realm(mdsc, oldrealm); mdsc 975 fs/ceph/snap.c __lookup_snap_realm(mdsc, mdsc 979 fs/ceph/snap.c adjust_snap_realm_parent(mdsc, child, realm->ino); mdsc 987 fs/ceph/snap.c ceph_update_snap_trace(mdsc, p, e, mdsc 992 fs/ceph/snap.c ceph_put_snap_realm(mdsc, realm); mdsc 994 fs/ceph/snap.c __cleanup_empty_realms(mdsc); mdsc 996 fs/ceph/snap.c up_write(&mdsc->snap_rwsem); mdsc 998 fs/ceph/snap.c flush_snaps(mdsc); mdsc 1006 fs/ceph/snap.c up_write(&mdsc->snap_rwsem); mdsc 1010 fs/ceph/snap.c struct ceph_snapid_map* ceph_get_snapid_map(struct ceph_mds_client *mdsc, mdsc 1018 fs/ceph/snap.c spin_lock(&mdsc->snapid_map_lock); mdsc 1019 fs/ceph/snap.c p = &mdsc->snapid_map_tree.rb_node; mdsc 1033 fs/ceph/snap.c spin_unlock(&mdsc->snapid_map_lock); mdsc 1055 fs/ceph/snap.c p = &mdsc->snapid_map_tree.rb_node; mdsc 1056 fs/ceph/snap.c spin_lock(&mdsc->snapid_map_lock); mdsc 1073 fs/ceph/snap.c rb_insert_color(&sm->node, &mdsc->snapid_map_tree); mdsc 1075 fs/ceph/snap.c spin_unlock(&mdsc->snapid_map_lock); mdsc 1087 fs/ceph/snap.c void ceph_put_snapid_map(struct ceph_mds_client* mdsc, mdsc 1092 fs/ceph/snap.c if (atomic_dec_and_lock(&sm->ref, &mdsc->snapid_map_lock)) { mdsc 1095 fs/ceph/snap.c list_add_tail(&sm->lru, &mdsc->snapid_map_lru); mdsc 1096 fs/ceph/snap.c spin_unlock(&mdsc->snapid_map_lock); mdsc 1100 fs/ceph/snap.c spin_unlock(&mdsc->snapid_map_lock); mdsc 1106 fs/ceph/snap.c void ceph_trim_snapid_map(struct ceph_mds_client *mdsc) mdsc 1112 fs/ceph/snap.c spin_lock(&mdsc->snapid_map_lock); mdsc 1115 fs/ceph/snap.c while (!list_empty(&mdsc->snapid_map_lru)) { mdsc 1116 fs/ceph/snap.c sm = list_first_entry(&mdsc->snapid_map_lru, mdsc 1121 fs/ceph/snap.c rb_erase(&sm->node, &mdsc->snapid_map_tree); mdsc 1124 fs/ceph/snap.c spin_unlock(&mdsc->snapid_map_lock); mdsc 1135 fs/ceph/snap.c void ceph_cleanup_snapid_map(struct ceph_mds_client *mdsc) mdsc 1141 fs/ceph/snap.c spin_lock(&mdsc->snapid_map_lock); mdsc 1142 fs/ceph/snap.c while ((p = rb_first(&mdsc->snapid_map_tree))) { mdsc 1144 fs/ceph/snap.c rb_erase(p, &mdsc->snapid_map_tree); mdsc 1148 fs/ceph/snap.c spin_unlock(&mdsc->snapid_map_lock); mdsc 43 fs/ceph/super.c ceph_mdsc_close_sessions(fsc->mdsc); mdsc 55 fs/ceph/super.c if (fsc->mdsc->mdsmap->m_num_data_pg_pools == 1) { mdsc 56 fs/ceph/super.c data_pool = fsc->mdsc->mdsmap->m_data_pg_pools[0]; mdsc 115 fs/ceph/super.c ceph_flush_dirty_caps(fsc->mdsc); mdsc 122 fs/ceph/super.c ceph_mdsc_sync(fsc->mdsc); mdsc 668 fs/ceph/super.c ceph_mdsc_handle_mdsmap(fsc->mdsc, msg); mdsc 671 fs/ceph/super.c ceph_mdsc_handle_fsmap(fsc->mdsc, msg); mdsc 884 fs/ceph/super.c ceph_mdsc_force_umount(fsc->mdsc); mdsc 916 fs/ceph/super.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 923 fs/ceph/super.c req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, USE_ANY_MDS); mdsc 938 fs/ceph/super.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 1158 fs/ceph/super.c if (!ceph_mdsmap_is_cluster_available(fsc->mdsc->mdsmap)) { mdsc 1163 fs/ceph/super.c ceph_mdsc_close_sessions(fsc->mdsc); mdsc 1181 fs/ceph/super.c ceph_mdsc_pre_umount(fsc->mdsc); mdsc 113 fs/ceph/super.h struct ceph_mds_client *mdsc; mdsc 688 fs/ceph/super.h extern void ceph_caps_init(struct ceph_mds_client *mdsc); mdsc 689 fs/ceph/super.h extern void ceph_caps_finalize(struct ceph_mds_client *mdsc); mdsc 690 fs/ceph/super.h extern void ceph_adjust_caps_max_min(struct ceph_mds_client *mdsc, mdsc 692 fs/ceph/super.h extern int ceph_reserve_caps(struct ceph_mds_client *mdsc, mdsc 694 fs/ceph/super.h extern void ceph_unreserve_caps(struct ceph_mds_client *mdsc, mdsc 860 fs/ceph/super.h struct ceph_snap_realm *ceph_lookup_snap_realm(struct ceph_mds_client *mdsc, mdsc 862 fs/ceph/super.h extern void ceph_get_snap_realm(struct ceph_mds_client *mdsc, mdsc 864 fs/ceph/super.h extern void ceph_put_snap_realm(struct ceph_mds_client *mdsc, mdsc 869 fs/ceph/super.h extern void ceph_handle_snap(struct ceph_mds_client *mdsc, mdsc 875 fs/ceph/super.h extern void ceph_cleanup_empty_realms(struct ceph_mds_client *mdsc); mdsc 877 fs/ceph/super.h extern struct ceph_snapid_map *ceph_get_snapid_map(struct ceph_mds_client *mdsc, mdsc 879 fs/ceph/super.h extern void ceph_put_snapid_map(struct ceph_mds_client* mdsc, mdsc 881 fs/ceph/super.h extern void ceph_trim_snapid_map(struct ceph_mds_client *mdsc); mdsc 882 fs/ceph/super.h extern void ceph_cleanup_snapid_map(struct ceph_mds_client *mdsc); mdsc 1036 fs/ceph/super.h extern struct ceph_cap *ceph_get_cap(struct ceph_mds_client *mdsc, mdsc 1045 fs/ceph/super.h extern void ceph_put_cap(struct ceph_mds_client *mdsc, mdsc 1052 fs/ceph/super.h extern void ceph_early_kick_flushing_caps(struct ceph_mds_client *mdsc, mdsc 1054 fs/ceph/super.h extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc, mdsc 1067 fs/ceph/super.h extern void ceph_check_delayed_caps(struct ceph_mds_client *mdsc); mdsc 1068 fs/ceph/super.h extern void ceph_flush_dirty_caps(struct ceph_mds_client *mdsc); mdsc 1090 fs/ceph/super.h extern void ceph_pool_perm_destroy(struct ceph_mds_client* mdsc); mdsc 1120 fs/ceph/super.h extern int ceph_trim_dentries(struct ceph_mds_client *mdsc); mdsc 1169 fs/ceph/super.h extern void ceph_handle_quota(struct ceph_mds_client *mdsc, mdsc 1180 fs/ceph/super.h extern void ceph_cleanup_quotarealms_inodes(struct ceph_mds_client *mdsc); mdsc 951 fs/ceph/xattr.c struct ceph_mds_client *mdsc = fsc->mdsc; mdsc 975 fs/ceph/xattr.c req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); mdsc 1000 fs/ceph/xattr.c err = ceph_mdsc_do_request(mdsc, NULL, req); mdsc 1015 fs/ceph/xattr.c struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc; mdsc 1073 fs/ceph/xattr.c if (!down_read_trylock(&mdsc->snap_rwsem)) { mdsc 1075 fs/ceph/xattr.c down_read(&mdsc->snap_rwsem); mdsc 1117 fs/ceph/xattr.c up_read(&mdsc->snap_rwsem); mdsc 1127 fs/ceph/xattr.c up_read(&mdsc->snap_rwsem);