Message ID | 20180730155536.31897-1-cgxu519@gmx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ceph: reset cap hold timeout only for requeued inode | expand |
Hi Yan, Objection for this? Thanks, Chengguang. On 2018/7/30 at 下午11:55, Chengguang Xu wrote: > __cap_delay_requeue() only requeue inode which does not > have CEPH_I_FLUSH flag, so avoid reset cap hold timeout > for that inode. > > Signed-off-by: Chengguang Xu <cgxu519@gmx.com> > --- > fs/ceph/caps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c > index f50cc008632a..3ed77faa6dc6 100644 > --- a/fs/ceph/caps.c > +++ b/fs/ceph/caps.c > @@ -535,7 +535,6 @@ static void __cap_set_timeouts(struct ceph_mds_client *mdsc, > static void __cap_delay_requeue(struct ceph_mds_client *mdsc, > struct ceph_inode_info *ci) > { > - __cap_set_timeouts(mdsc, ci); > dout("__cap_delay_requeue %p flags %d at %lu\n", &ci->vfs_inode, > ci->i_ceph_flags, ci->i_hold_caps_max); > if (!mdsc->stopping) { > @@ -545,6 +544,7 @@ static void __cap_delay_requeue(struct ceph_mds_client *mdsc, > goto no_change; > list_del_init(&ci->i_cap_delay_list); > } > + __cap_set_timeouts(mdsc, ci); > list_add_tail(&ci->i_cap_delay_list, &mdsc->cap_delay_list); > no_change: > spin_unlock(&mdsc->cap_delay_lock); > -- > 2.17.1 > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jul 30, 2018 at 11:59 PM Chengguang Xu <cgxu519@gmx.com> wrote: > > __cap_delay_requeue() only requeue inode which does not > have CEPH_I_FLUSH flag, so avoid reset cap hold timeout > for that inode. > > Signed-off-by: Chengguang Xu <cgxu519@gmx.com> > --- > fs/ceph/caps.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c > index f50cc008632a..3ed77faa6dc6 100644 > --- a/fs/ceph/caps.c > +++ b/fs/ceph/caps.c > @@ -535,7 +535,6 @@ static void __cap_set_timeouts(struct ceph_mds_client *mdsc, > static void __cap_delay_requeue(struct ceph_mds_client *mdsc, > struct ceph_inode_info *ci) > { > - __cap_set_timeouts(mdsc, ci); > dout("__cap_delay_requeue %p flags %d at %lu\n", &ci->vfs_inode, > ci->i_ceph_flags, ci->i_hold_caps_max); > if (!mdsc->stopping) { > @@ -545,6 +544,7 @@ static void __cap_delay_requeue(struct ceph_mds_client *mdsc, > goto no_change; > list_del_init(&ci->i_cap_delay_list); > } > + __cap_set_timeouts(mdsc, ci); > list_add_tail(&ci->i_cap_delay_list, &mdsc->cap_delay_list); > no_change: > spin_unlock(&mdsc->cap_delay_lock); > -- > 2.17.1 > Applied, thanks Yan, Zheng > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index f50cc008632a..3ed77faa6dc6 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -535,7 +535,6 @@ static void __cap_set_timeouts(struct ceph_mds_client *mdsc, static void __cap_delay_requeue(struct ceph_mds_client *mdsc, struct ceph_inode_info *ci) { - __cap_set_timeouts(mdsc, ci); dout("__cap_delay_requeue %p flags %d at %lu\n", &ci->vfs_inode, ci->i_ceph_flags, ci->i_hold_caps_max); if (!mdsc->stopping) { @@ -545,6 +544,7 @@ static void __cap_delay_requeue(struct ceph_mds_client *mdsc, goto no_change; list_del_init(&ci->i_cap_delay_list); } + __cap_set_timeouts(mdsc, ci); list_add_tail(&ci->i_cap_delay_list, &mdsc->cap_delay_list); no_change: spin_unlock(&mdsc->cap_delay_lock);
__cap_delay_requeue() only requeue inode which does not have CEPH_I_FLUSH flag, so avoid reset cap hold timeout for that inode. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)