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()
751 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local
777 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup()
789 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
803 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
851 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mknod() local
877 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod()
895 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
917 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_symlink() local
939 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS); in ceph_symlink()
962 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
976 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mkdir() local
1013 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_mkdir()
1031 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
1049 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_link() local
1062 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LINK, USE_AUTH_MDS); in ceph_link()
1077 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
1088 static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc, in ceph_async_unlink_cb() argument
1184 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local
1203 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_unlink()
1237 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1262 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1276 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() local
1303 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_rename()
1324 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
1347 struct ceph_mds_client *mdsc; in __ceph_dentry_lease_touch() local
1357 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch()
1358 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1359 list_move_tail(&di->lease_list, &mdsc->dentry_leases); in __ceph_dentry_lease_touch()
1360 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1363 static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, in __dentry_dir_lease_touch() argument
1369 list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); in __dentry_dir_lease_touch()
1381 struct ceph_mds_client *mdsc; in __ceph_dentry_dir_lease_touch() local
1404 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch()
1405 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1406 __dentry_dir_lease_touch(mdsc, di), in __ceph_dentry_dir_lease_touch()
1407 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1412 struct ceph_mds_client *mdsc; in __dentry_lease_unlist() local
1418 mdsc = ceph_sb_to_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist()
1419 spin_lock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1421 spin_unlock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1439 __dentry_leases_walk(struct ceph_mds_client *mdsc, in __dentry_leases_walk() argument
1450 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk()
1451 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1472 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1496 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1507 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1510 &mdsc->dentry_leases); in __dentry_leases_walk()
1512 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1514 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1566 int ceph_trim_dentries(struct ceph_mds_client *mdsc) in ceph_trim_dentries() argument
1572 spin_lock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1573 if (mdsc->caps_use_max > 0 && in ceph_trim_dentries()
1574 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries()
1575 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries()
1578 spin_unlock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1582 freed = __dentry_leases_walk(mdsc, &lwc, __dentry_lease_check); in ceph_trim_dentries()
1591 lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; in ceph_trim_dentries()
1592 freed +=__dentry_leases_walk(mdsc, &lwc, __dir_lease_check); in ceph_trim_dentries()
1717 struct ceph_mds_client *mdsc) in dir_lease_is_valid() argument
1726 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in dir_lease_is_valid()
1754 struct ceph_mds_client *mdsc; in ceph_d_revalidate() local
1771 mdsc = ceph_sb_to_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1784 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
1800 percpu_counter_inc(&mdsc->metric.d_lease_mis); in ceph_d_revalidate()
1804 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_d_revalidate()
1816 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_d_revalidate()
1835 percpu_counter_inc(&mdsc->metric.d_lease_hit); in ceph_d_revalidate()
1882 atomic64_dec(&fsc->mdsc->metric.total_dentries); in ceph_d_release()