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()
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()
457 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir()
800 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local
840 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup()
853 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
867 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
915 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mknod() local
916 struct ceph_client *cl = mdsc->fsc->client; in ceph_mknod()
935 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod()
965 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
1277 char *path = ceph_mdsc_build_path(mdsc, dentry, &pathlen, in ceph_async_unlink_cb()
1343 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local
1371 path = ceph_mdsc_build_path(mdsc, dn, &pathlen, &pathbase, 0); in ceph_unlink()
1376 err = ceph_mds_check_access(mdsc, path, MAY_WRITE); in ceph_unlink()
1391 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_unlink()
1425 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1450 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1464 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() local
1465 struct ceph_client *cl = mdsc->fsc->client; in ceph_rename()
1498 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_rename()
1519 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
1542 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch() local
1543 struct ceph_client *cl = mdsc->fsc->client; in __ceph_dentry_lease_touch()
1553 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1554 list_move_tail(&di->lease_list, &mdsc->dentry_leases); in __ceph_dentry_lease_touch()
1555 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1558 static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, in __dentry_dir_lease_touch() argument
1564 list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); in __dentry_dir_lease_touch()
1576 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch() local
1577 struct ceph_client *cl = mdsc->fsc->client; in __ceph_dentry_dir_lease_touch()
1599 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1600 __dentry_dir_lease_touch(mdsc, di); in __ceph_dentry_dir_lease_touch()
1601 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1606 struct ceph_mds_client *mdsc; in __dentry_lease_unlist() local
1612 mdsc = ceph_sb_to_fs_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist()
1613 spin_lock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1615 spin_unlock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1636 __dentry_leases_walk(struct ceph_mds_client *mdsc, in __dentry_leases_walk() argument
1646 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk()
1647 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1671 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1695 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1706 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1709 &mdsc->dentry_leases); in __dentry_leases_walk()
1711 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1713 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1765 int ceph_trim_dentries(struct ceph_mds_client *mdsc) in ceph_trim_dentries() argument
1771 spin_lock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1772 if (mdsc->caps_use_max > 0 && in ceph_trim_dentries()
1773 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries()
1774 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries()
1777 spin_unlock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1781 freed = __dentry_leases_walk(mdsc, &lwc); in ceph_trim_dentries()
1790 lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; in ceph_trim_dentries()
1791 freed +=__dentry_leases_walk(mdsc, &lwc); in ceph_trim_dentries()
1844 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dentry->d_sb)->mdsc; in dentry_lease_is_valid() local
1845 struct ceph_client *cl = mdsc->fsc->client; in dentry_lease_is_valid()
1918 struct ceph_mds_client *mdsc) in dir_lease_is_valid() argument
1921 struct ceph_client *cl = mdsc->fsc->client; in dir_lease_is_valid()
1928 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in dir_lease_is_valid()
1955 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dentry->d_sb)->mdsc; in ceph_d_revalidate() local
1956 struct ceph_client *cl = mdsc->fsc->client; in ceph_d_revalidate()
1970 mdsc = ceph_sb_to_fs_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1983 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
1999 percpu_counter_inc(&mdsc->metric.d_lease_mis); in ceph_d_revalidate()
2003 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_d_revalidate()
2017 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_d_revalidate()
2036 percpu_counter_inc(&mdsc->metric.d_lease_hit); in ceph_d_revalidate()
2080 atomic64_dec(&fsc->mdsc->metric.total_dentries); in ceph_d_release()
2099 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dentry->d_sb); in ceph_d_prune() local
2100 struct ceph_client *cl = mdsc->fsc->client; in ceph_d_prune()