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()
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()
1024 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_symlink() local
1025 struct ceph_client *cl = mdsc->fsc->client; in ceph_symlink()
1045 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS); in ceph_symlink()
1083 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
1098 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mkdir() local
1099 struct ceph_client *cl = mdsc->fsc->client; in ceph_mkdir()
1136 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_mkdir()
1164 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
1190 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_link() local
1191 struct ceph_client *cl = mdsc->fsc->client; in ceph_link()
1211 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LINK, USE_AUTH_MDS); in ceph_link()
1232 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
1243 static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc, in ceph_async_unlink_cb() argument
1276 char *path = ceph_mdsc_build_path(mdsc, dentry, &pathlen, in ceph_async_unlink_cb()
1342 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local
1370 path = ceph_mdsc_build_path(mdsc, dn, &pathlen, &pathbase, 0); in ceph_unlink()
1375 err = ceph_mds_check_access(mdsc, path, MAY_WRITE); in ceph_unlink()
1390 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_unlink()
1424 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1449 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1463 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() local
1464 struct ceph_client *cl = mdsc->fsc->client; in ceph_rename()
1497 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_rename()
1518 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
1541 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch() local
1542 struct ceph_client *cl = mdsc->fsc->client; in __ceph_dentry_lease_touch()
1552 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1553 list_move_tail(&di->lease_list, &mdsc->dentry_leases); in __ceph_dentry_lease_touch()
1554 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1557 static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, in __dentry_dir_lease_touch() argument
1563 list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); in __dentry_dir_lease_touch()
1575 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch() local
1576 struct ceph_client *cl = mdsc->fsc->client; in __ceph_dentry_dir_lease_touch()
1598 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1599 __dentry_dir_lease_touch(mdsc, di); in __ceph_dentry_dir_lease_touch()
1600 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1605 struct ceph_mds_client *mdsc; in __dentry_lease_unlist() local
1611 mdsc = ceph_sb_to_fs_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist()
1612 spin_lock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1614 spin_unlock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1635 __dentry_leases_walk(struct ceph_mds_client *mdsc, in __dentry_leases_walk() argument
1645 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk()
1646 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1670 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1694 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1705 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1708 &mdsc->dentry_leases); in __dentry_leases_walk()
1710 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1712 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1764 int ceph_trim_dentries(struct ceph_mds_client *mdsc) in ceph_trim_dentries() argument
1770 spin_lock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1771 if (mdsc->caps_use_max > 0 && in ceph_trim_dentries()
1772 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries()
1773 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries()
1776 spin_unlock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1780 freed = __dentry_leases_walk(mdsc, &lwc); in ceph_trim_dentries()
1789 lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; in ceph_trim_dentries()
1790 freed +=__dentry_leases_walk(mdsc, &lwc); in ceph_trim_dentries()
1843 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dentry->d_sb)->mdsc; in dentry_lease_is_valid() local
1844 struct ceph_client *cl = mdsc->fsc->client; in dentry_lease_is_valid()
1917 struct ceph_mds_client *mdsc) in dir_lease_is_valid() argument
1920 struct ceph_client *cl = mdsc->fsc->client; in dir_lease_is_valid()
1927 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in dir_lease_is_valid()
1954 struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(dentry->d_sb)->mdsc; in ceph_d_revalidate() local
1955 struct ceph_client *cl = mdsc->fsc->client; in ceph_d_revalidate()
1969 mdsc = ceph_sb_to_fs_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1982 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
1998 percpu_counter_inc(&mdsc->metric.d_lease_mis); in ceph_d_revalidate()
2002 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_d_revalidate()
2016 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_d_revalidate()
2035 percpu_counter_inc(&mdsc->metric.d_lease_hit); in ceph_d_revalidate()
2079 atomic64_dec(&fsc->mdsc->metric.total_dentries); in ceph_d_release()
2098 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dentry->d_sb); in ceph_d_prune() local
2099 struct ceph_client *cl = mdsc->fsc->client; in ceph_d_prune()