Loading fs/ceph/dir.c +3 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ int ceph_init_dentry(struct dentry *dentry) di->dentry = dentry; di->lease_session = NULL; dentry->d_time = jiffies; di->time = jiffies; /* avoid reordering d_fsdata setup so that the check above is safe */ smp_mb(); dentry->d_fsdata = di; Loading Loading @@ -1124,7 +1124,7 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, void ceph_invalidate_dentry_lease(struct dentry *dentry) { spin_lock(&dentry->d_lock); dentry->d_time = jiffies; ceph_dentry(dentry)->time = jiffies; ceph_dentry(dentry)->lease_shared_gen = 0; spin_unlock(&dentry->d_lock); } Loading Loading @@ -1154,7 +1154,7 @@ static int dentry_lease_is_valid(struct dentry *dentry) spin_unlock(&s->s_gen_ttl_lock); if (di->lease_gen == gen && time_before(jiffies, dentry->d_time) && time_before(jiffies, di->time) && time_before(jiffies, ttl)) { valid = 1; if (di->lease_renew_after && Loading fs/ceph/inode.c +2 −2 Original line number Diff line number Diff line Loading @@ -1042,7 +1042,7 @@ static void update_dentry_lease(struct dentry *dentry, goto out_unlock; if (di->lease_gen == session->s_cap_gen && time_before(ttl, dentry->d_time)) time_before(ttl, di->time)) goto out_unlock; /* we already have a newer lease. */ if (di->lease_session && di->lease_session != session) Loading @@ -1056,7 +1056,7 @@ static void update_dentry_lease(struct dentry *dentry, di->lease_seq = le32_to_cpu(lease->seq); di->lease_renew_after = half_ttl; di->lease_renew_from = 0; dentry->d_time = ttl; di->time = ttl; out_unlock: spin_unlock(&dentry->d_lock); return; Loading fs/ceph/mds_client.c +2 −2 Original line number Diff line number Diff line Loading @@ -3226,7 +3226,7 @@ static void handle_lease(struct ceph_mds_client *mdsc, msecs_to_jiffies(le32_to_cpu(h->duration_ms)); di->lease_seq = seq; dentry->d_time = di->lease_renew_from + duration; di->time = di->lease_renew_from + duration; di->lease_renew_after = di->lease_renew_from + (duration >> 1); di->lease_renew_from = 0; Loading Loading @@ -3311,7 +3311,7 @@ void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc, struct inode *inode, if (!di || !di->lease_session || di->lease_session->s_mds < 0 || di->lease_gen != di->lease_session->s_cap_gen || !time_before(jiffies, dentry->d_time)) { !time_before(jiffies, di->time)) { dout("lease_release inode %p dentry %p -- " "no lease\n", inode, dentry); Loading fs/ceph/super.h +1 −1 Original line number Diff line number Diff line Loading @@ -246,7 +246,7 @@ struct ceph_dentry_info { unsigned long lease_renew_after, lease_renew_from; struct list_head lru; struct dentry *dentry; u64 time; unsigned long time; u64 offset; }; Loading Loading
fs/ceph/dir.c +3 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ int ceph_init_dentry(struct dentry *dentry) di->dentry = dentry; di->lease_session = NULL; dentry->d_time = jiffies; di->time = jiffies; /* avoid reordering d_fsdata setup so that the check above is safe */ smp_mb(); dentry->d_fsdata = di; Loading Loading @@ -1124,7 +1124,7 @@ static int ceph_rename(struct inode *old_dir, struct dentry *old_dentry, void ceph_invalidate_dentry_lease(struct dentry *dentry) { spin_lock(&dentry->d_lock); dentry->d_time = jiffies; ceph_dentry(dentry)->time = jiffies; ceph_dentry(dentry)->lease_shared_gen = 0; spin_unlock(&dentry->d_lock); } Loading Loading @@ -1154,7 +1154,7 @@ static int dentry_lease_is_valid(struct dentry *dentry) spin_unlock(&s->s_gen_ttl_lock); if (di->lease_gen == gen && time_before(jiffies, dentry->d_time) && time_before(jiffies, di->time) && time_before(jiffies, ttl)) { valid = 1; if (di->lease_renew_after && Loading
fs/ceph/inode.c +2 −2 Original line number Diff line number Diff line Loading @@ -1042,7 +1042,7 @@ static void update_dentry_lease(struct dentry *dentry, goto out_unlock; if (di->lease_gen == session->s_cap_gen && time_before(ttl, dentry->d_time)) time_before(ttl, di->time)) goto out_unlock; /* we already have a newer lease. */ if (di->lease_session && di->lease_session != session) Loading @@ -1056,7 +1056,7 @@ static void update_dentry_lease(struct dentry *dentry, di->lease_seq = le32_to_cpu(lease->seq); di->lease_renew_after = half_ttl; di->lease_renew_from = 0; dentry->d_time = ttl; di->time = ttl; out_unlock: spin_unlock(&dentry->d_lock); return; Loading
fs/ceph/mds_client.c +2 −2 Original line number Diff line number Diff line Loading @@ -3226,7 +3226,7 @@ static void handle_lease(struct ceph_mds_client *mdsc, msecs_to_jiffies(le32_to_cpu(h->duration_ms)); di->lease_seq = seq; dentry->d_time = di->lease_renew_from + duration; di->time = di->lease_renew_from + duration; di->lease_renew_after = di->lease_renew_from + (duration >> 1); di->lease_renew_from = 0; Loading Loading @@ -3311,7 +3311,7 @@ void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc, struct inode *inode, if (!di || !di->lease_session || di->lease_session->s_mds < 0 || di->lease_gen != di->lease_session->s_cap_gen || !time_before(jiffies, dentry->d_time)) { !time_before(jiffies, di->time)) { dout("lease_release inode %p dentry %p -- " "no lease\n", inode, dentry); Loading
fs/ceph/super.h +1 −1 Original line number Diff line number Diff line Loading @@ -246,7 +246,7 @@ struct ceph_dentry_info { unsigned long lease_renew_after, lease_renew_from; struct list_head lru; struct dentry *dentry; u64 time; unsigned long time; u64 offset; }; Loading