Lines Matching refs:mdsc

42 	struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dentry->d_sb);  in ceph_d_init()  local
54 atomic64_inc(&mdsc->metric.total_dentries); in ceph_d_init()
314 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local
353 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_WR); in ceph_readdir()
396 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_readdir()
444 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir()
775 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local
813 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup()
825 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
839 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
887 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mknod() local
906 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod()
935 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
995 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_symlink() local
1014 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS); in ceph_symlink()
1051 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
1066 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mkdir() local
1101 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_mkdir()
1127 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
1146 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_link() local
1166 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LINK, USE_AUTH_MDS); in ceph_link()
1187 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
1198 static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc, in ceph_async_unlink_cb() argument
1229 char *path = ceph_mdsc_build_path(mdsc, dentry, &pathlen, in ceph_async_unlink_cb()
1294 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local
1313 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_unlink()
1347 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1372 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1386 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() local
1418 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_rename()
1439 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
1462 struct ceph_mds_client *mdsc; in __ceph_dentry_lease_touch() local
1472 mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch()
1473 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1474 list_move_tail(&di->lease_list, &mdsc->dentry_leases); in __ceph_dentry_lease_touch()
1475 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1478 static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, in __dentry_dir_lease_touch() argument
1484 list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); in __dentry_dir_lease_touch()
1496 struct ceph_mds_client *mdsc; in __ceph_dentry_dir_lease_touch() local
1519 mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch()
1520 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1521 __dentry_dir_lease_touch(mdsc, di), in __ceph_dentry_dir_lease_touch()
1522 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1527 struct ceph_mds_client *mdsc; in __dentry_lease_unlist() local
1533 mdsc = ceph_sb_to_fs_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist()
1534 spin_lock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1536 spin_unlock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1554 __dentry_leases_walk(struct ceph_mds_client *mdsc, in __dentry_leases_walk() argument
1565 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk()
1566 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1587 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1611 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1622 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1625 &mdsc->dentry_leases); in __dentry_leases_walk()
1627 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1629 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1681 int ceph_trim_dentries(struct ceph_mds_client *mdsc) in ceph_trim_dentries() argument
1687 spin_lock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1688 if (mdsc->caps_use_max > 0 && in ceph_trim_dentries()
1689 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries()
1690 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries()
1693 spin_unlock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1697 freed = __dentry_leases_walk(mdsc, &lwc, __dentry_lease_check); in ceph_trim_dentries()
1706 lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; in ceph_trim_dentries()
1707 freed +=__dentry_leases_walk(mdsc, &lwc, __dir_lease_check); in ceph_trim_dentries()
1832 struct ceph_mds_client *mdsc) in dir_lease_is_valid() argument
1841 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in dir_lease_is_valid()
1869 struct ceph_mds_client *mdsc; in ceph_d_revalidate() local
1891 mdsc = ceph_sb_to_fs_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1904 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
1920 percpu_counter_inc(&mdsc->metric.d_lease_mis); in ceph_d_revalidate()
1924 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_d_revalidate()
1936 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_d_revalidate()
1955 percpu_counter_inc(&mdsc->metric.d_lease_hit); in ceph_d_revalidate()
2002 atomic64_dec(&fsc->mdsc->metric.total_dentries); in ceph_d_release()