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()
749 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local
775 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup()
787 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
800 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
838 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mknod() local
860 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod()
877 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
899 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_symlink() local
917 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS); in ceph_symlink()
938 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
951 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mkdir() local
983 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_mkdir()
1000 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
1018 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_link() local
1027 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LINK, USE_AUTH_MDS); in ceph_link()
1041 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
1052 static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc, in ceph_async_unlink_cb() argument
1130 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local
1149 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_unlink()
1170 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1185 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1199 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() local
1215 err = ceph_quota_check_rename(mdsc, d_inode(old_dentry), in ceph_rename()
1223 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_rename()
1243 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
1266 struct ceph_mds_client *mdsc; in __ceph_dentry_lease_touch() local
1276 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch()
1277 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1278 list_move_tail(&di->lease_list, &mdsc->dentry_leases); in __ceph_dentry_lease_touch()
1279 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1282 static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, in __dentry_dir_lease_touch() argument
1288 list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); in __dentry_dir_lease_touch()
1300 struct ceph_mds_client *mdsc; in __ceph_dentry_dir_lease_touch() local
1323 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch()
1324 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1325 __dentry_dir_lease_touch(mdsc, di), in __ceph_dentry_dir_lease_touch()
1326 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1331 struct ceph_mds_client *mdsc; in __dentry_lease_unlist() local
1337 mdsc = ceph_sb_to_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist()
1338 spin_lock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1340 spin_unlock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1358 __dentry_leases_walk(struct ceph_mds_client *mdsc, in __dentry_leases_walk() argument
1369 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk()
1370 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1391 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1415 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1426 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1429 &mdsc->dentry_leases); in __dentry_leases_walk()
1431 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1433 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1485 int ceph_trim_dentries(struct ceph_mds_client *mdsc) in ceph_trim_dentries() argument
1491 spin_lock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1492 if (mdsc->caps_use_max > 0 && in ceph_trim_dentries()
1493 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries()
1494 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries()
1497 spin_unlock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1501 freed = __dentry_leases_walk(mdsc, &lwc, __dentry_lease_check); in ceph_trim_dentries()
1510 lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; in ceph_trim_dentries()
1511 freed +=__dentry_leases_walk(mdsc, &lwc, __dir_lease_check); in ceph_trim_dentries()
1638 struct ceph_mds_client *mdsc) in dir_lease_is_valid() argument
1647 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in dir_lease_is_valid()
1675 struct ceph_mds_client *mdsc; in ceph_d_revalidate() local
1692 mdsc = ceph_sb_to_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1705 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
1721 percpu_counter_inc(&mdsc->metric.d_lease_mis); in ceph_d_revalidate()
1725 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_d_revalidate()
1736 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_d_revalidate()
1755 percpu_counter_inc(&mdsc->metric.d_lease_hit); in ceph_d_revalidate()
1802 atomic64_dec(&fsc->mdsc->metric.total_dentries); in ceph_d_release()