Lines Matching refs:mdsc
41 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dentry->d_sb); in ceph_d_init() local
53 atomic64_inc(&mdsc->metric.total_dentries); in ceph_d_init()
311 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_readdir() local
346 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_WR); in ceph_readdir()
389 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_readdir()
426 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_readdir()
742 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local
768 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup()
780 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
794 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
842 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mknod() local
864 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod()
882 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
904 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_symlink() local
922 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS); in ceph_symlink()
945 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
959 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mkdir() local
991 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_mkdir()
1009 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
1027 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_link() local
1036 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LINK, USE_AUTH_MDS); in ceph_link()
1051 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
1062 static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc, in ceph_async_unlink_cb() argument
1140 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local
1159 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_unlink()
1181 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1196 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1210 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() local
1233 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_rename()
1254 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
1277 struct ceph_mds_client *mdsc; in __ceph_dentry_lease_touch() local
1287 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch()
1288 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1289 list_move_tail(&di->lease_list, &mdsc->dentry_leases); in __ceph_dentry_lease_touch()
1290 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1293 static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, in __dentry_dir_lease_touch() argument
1299 list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); in __dentry_dir_lease_touch()
1311 struct ceph_mds_client *mdsc; in __ceph_dentry_dir_lease_touch() local
1334 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch()
1335 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1336 __dentry_dir_lease_touch(mdsc, di), in __ceph_dentry_dir_lease_touch()
1337 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1342 struct ceph_mds_client *mdsc; in __dentry_lease_unlist() local
1348 mdsc = ceph_sb_to_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist()
1349 spin_lock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1351 spin_unlock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1369 __dentry_leases_walk(struct ceph_mds_client *mdsc, in __dentry_leases_walk() argument
1380 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk()
1381 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1402 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1426 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1437 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1440 &mdsc->dentry_leases); in __dentry_leases_walk()
1442 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1444 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1496 int ceph_trim_dentries(struct ceph_mds_client *mdsc) in ceph_trim_dentries() argument
1502 spin_lock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1503 if (mdsc->caps_use_max > 0 && in ceph_trim_dentries()
1504 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries()
1505 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries()
1508 spin_unlock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1512 freed = __dentry_leases_walk(mdsc, &lwc, __dentry_lease_check); in ceph_trim_dentries()
1521 lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; in ceph_trim_dentries()
1522 freed +=__dentry_leases_walk(mdsc, &lwc, __dir_lease_check); in ceph_trim_dentries()
1647 struct ceph_mds_client *mdsc) in dir_lease_is_valid() argument
1656 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in dir_lease_is_valid()
1684 struct ceph_mds_client *mdsc; in ceph_d_revalidate() local
1701 mdsc = ceph_sb_to_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1714 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
1730 percpu_counter_inc(&mdsc->metric.d_lease_mis); in ceph_d_revalidate()
1734 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_d_revalidate()
1746 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_d_revalidate()
1765 percpu_counter_inc(&mdsc->metric.d_lease_hit); in ceph_d_revalidate()
1812 atomic64_dec(&fsc->mdsc->metric.total_dentries); in ceph_d_release()