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()
740 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup() local
766 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in ceph_lookup()
778 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_lookup()
791 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_lookup()
829 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mknod() local
851 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_MKNOD, USE_AUTH_MDS); in ceph_mknod()
868 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
890 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_symlink() local
908 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS); in ceph_symlink()
929 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
942 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mkdir() local
974 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_mkdir()
991 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
1009 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_link() local
1018 req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_LINK, USE_AUTH_MDS); in ceph_link()
1032 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
1043 static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc, in ceph_async_unlink_cb() argument
1121 struct ceph_mds_client *mdsc = fsc->mdsc; in ceph_unlink() local
1140 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_unlink()
1161 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1176 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1190 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old_dir->i_sb); in ceph_rename() local
1206 err = ceph_quota_check_rename(mdsc, d_inode(old_dentry), in ceph_rename()
1214 req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); in ceph_rename()
1234 err = ceph_mdsc_do_request(mdsc, old_dir, req); in ceph_rename()
1257 struct ceph_mds_client *mdsc; in __ceph_dentry_lease_touch() local
1267 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_lease_touch()
1268 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1269 list_move_tail(&di->lease_list, &mdsc->dentry_leases); in __ceph_dentry_lease_touch()
1270 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_lease_touch()
1273 static void __dentry_dir_lease_touch(struct ceph_mds_client* mdsc, in __dentry_dir_lease_touch() argument
1279 list_move_tail(&di->lease_list, &mdsc->dentry_dir_leases); in __dentry_dir_lease_touch()
1291 struct ceph_mds_client *mdsc; in __ceph_dentry_dir_lease_touch() local
1314 mdsc = ceph_sb_to_client(dn->d_sb)->mdsc; in __ceph_dentry_dir_lease_touch()
1315 spin_lock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1316 __dentry_dir_lease_touch(mdsc, di), in __ceph_dentry_dir_lease_touch()
1317 spin_unlock(&mdsc->dentry_list_lock); in __ceph_dentry_dir_lease_touch()
1322 struct ceph_mds_client *mdsc; in __dentry_lease_unlist() local
1328 mdsc = ceph_sb_to_client(di->dentry->d_sb)->mdsc; in __dentry_lease_unlist()
1329 spin_lock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1331 spin_unlock(&mdsc->dentry_list_lock); in __dentry_lease_unlist()
1349 __dentry_leases_walk(struct ceph_mds_client *mdsc, in __dentry_leases_walk() argument
1360 list = lwc->dir_lease ? &mdsc->dentry_dir_leases : &mdsc->dentry_leases; in __dentry_leases_walk()
1361 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1382 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1406 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1417 spin_lock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1420 &mdsc->dentry_leases); in __dentry_leases_walk()
1422 __dentry_dir_lease_touch(mdsc, di); in __dentry_leases_walk()
1424 spin_unlock(&mdsc->dentry_list_lock); in __dentry_leases_walk()
1476 int ceph_trim_dentries(struct ceph_mds_client *mdsc) in ceph_trim_dentries() argument
1482 spin_lock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1483 if (mdsc->caps_use_max > 0 && in ceph_trim_dentries()
1484 mdsc->caps_use_count > mdsc->caps_use_max) in ceph_trim_dentries()
1485 count = mdsc->caps_use_count - mdsc->caps_use_max; in ceph_trim_dentries()
1488 spin_unlock(&mdsc->caps_list_lock); in ceph_trim_dentries()
1492 freed = __dentry_leases_walk(mdsc, &lwc, __dentry_lease_check); in ceph_trim_dentries()
1501 lwc.dir_lease_ttl = mdsc->fsc->mount_options->caps_wanted_delay_max * HZ; in ceph_trim_dentries()
1502 freed +=__dentry_leases_walk(mdsc, &lwc, __dir_lease_check); in ceph_trim_dentries()
1629 struct ceph_mds_client *mdsc) in dir_lease_is_valid() argument
1638 __ceph_touch_fmode(ci, mdsc, CEPH_FILE_MODE_RD); in dir_lease_is_valid()
1666 struct ceph_mds_client *mdsc; in ceph_d_revalidate() local
1683 mdsc = ceph_sb_to_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1696 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
1712 percpu_counter_inc(&mdsc->metric.d_lease_mis); in ceph_d_revalidate()
1716 req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); in ceph_d_revalidate()
1727 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_d_revalidate()
1746 percpu_counter_inc(&mdsc->metric.d_lease_hit); in ceph_d_revalidate()
1793 atomic64_dec(&fsc->mdsc->metric.total_dentries); in ceph_d_release()