Lines Matching full: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()
323 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local
366 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_WR); in ceph_readdir()
409 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_readdir()
456 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir()
799 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local
839 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup()
852 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
866 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
914 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mknod() local
915 struct ceph_client *cl = mdsc->fsc->client; in ceph_mknod()
934 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod()
964 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
1025 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_symlink() local
1026 struct ceph_client *cl = mdsc->fsc->client; in ceph_symlink()
1046 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS); in ceph_symlink()
1084 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
1099 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mkdir() local
1100 struct ceph_client *cl = mdsc->fsc->client; in ceph_mkdir()
1137 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_mkdir()
1165 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
1191 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_link() local
1192 struct ceph_client *cl = mdsc->fsc->client; in ceph_link()
1212 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LINK, USE_AUTH_MDS); in ceph_link()
1233 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
1244 static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc, in ceph_async_unlink_cb() argument
1275 char *path = ceph_mdsc_build_path(mdsc, dentry, &path_info, 0); in ceph_async_unlink_cb()
1340 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local
1368 path = ceph_mdsc_build_path(mdsc, dn, &path_info, 0); in ceph_unlink()
1373 err = ceph_mds_check_access(mdsc, path, MAY_WRITE); in ceph_unlink()
1388 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_unlink()
1422 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1459 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1473 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() local
1474 struct ceph_client *cl = mdsc->fsc->client; in ceph_rename()
1507 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_rename()
1528 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
1542 * Move dentry to tail of mdsc->dentry_leases list when lease is updated.
1551 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch() local
1552 struct ceph_client *cl = mdsc->fsc->client; in __ceph_dentry_lease_touch()
1562 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1563 list_move_tail(&di->lease_list, &mdsc->dentry_leases); in __ceph_dentry_lease_touch()
1564 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1567 static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, in __dentry_dir_lease_touch() argument
1573 list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); in __dentry_dir_lease_touch()
1577 * When dir lease is used, add dentry to tail of mdsc->dentry_dir_leases
1585 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch() local
1586 struct ceph_client *cl = mdsc->fsc->client; in __ceph_dentry_dir_lease_touch()
1608 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1609 __dentry_dir_lease_touch(mdsc, di); in __ceph_dentry_dir_lease_touch()
1610 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1615 struct ceph_mds_client *mdsc; in __dentry_lease_unlist() local
1621 mdsc = ceph_sb_to_fs_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist()
1622 spin_lock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1624 spin_unlock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1645 __dentry_leases_walk(struct ceph_mds_client *mdsc, in __dentry_leases_walk() argument
1655 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk()
1656 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1680 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1704 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1715 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1718 &mdsc->dentry_leases); in __dentry_leases_walk()
1720 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1722 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1774 int ceph_trim_dentries(struct ceph_mds_client *mdsc) in ceph_trim_dentries() argument
1780 spin_lock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1781 if (mdsc->caps_use_max > 0 && in ceph_trim_dentries()
1782 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries()
1783 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries()
1786 spin_unlock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1790 freed = __dentry_leases_walk(mdsc, &lwc); in ceph_trim_dentries()
1799 lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; in ceph_trim_dentries()
1800 freed +=__dentry_leases_walk(mdsc, &lwc); in ceph_trim_dentries()
1853 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dentry->d_sb)->mdsc; in dentry_lease_is_valid() local
1854 struct ceph_client *cl = mdsc->fsc->client; in dentry_lease_is_valid()
1927 struct ceph_mds_client *mdsc) in dir_lease_is_valid() argument
1930 struct ceph_client *cl = mdsc->fsc->client; in dir_lease_is_valid()
1937 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in dir_lease_is_valid()
1964 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dentry->d_sb)->mdsc; in ceph_d_revalidate() local
1965 struct ceph_client *cl = mdsc->fsc->client; in ceph_d_revalidate()
1979 mdsc = ceph_sb_to_fs_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1992 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
2008 percpu_counter_inc(&mdsc->metric.d_lease_mis); in ceph_d_revalidate()
2012 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_d_revalidate()
2026 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_d_revalidate()
2045 percpu_counter_inc(&mdsc->metric.d_lease_hit); in ceph_d_revalidate()
2089 atomic64_dec(&fsc->mdsc->metric.total_dentries); in ceph_d_release()
2108 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dentry->d_sb); in ceph_d_prune() local
2109 struct ceph_client *cl = mdsc->fsc->client; in ceph_d_prune()