提交 83267ecc 编写于 作者: X Xiubo Li 提交者: zhaoxiaoqiang11

ceph: flush cap releases when the session is flushed

stable inclusion
from stable-v5.10.168
commit 6ff8b48253926147e441b9d0c833ca6494707d0b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7URR4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6ff8b48253926147e441b9d0c833ca6494707d0b

----------------------------------------------------

commit e7d84c6a upstream.

MDS expects the completed cap release prior to responding to the
session flush for cache drop.

Cc: stable@vger.kernel.org
Link: http://tracker.ceph.com/issues/38009Signed-off-by: NXiubo Li <xiubli@redhat.com>
Reviewed-by: NVenky Shankar <vshankar@redhat.com>
Reviewed-by: NJeff Layton <jlayton@kernel.org>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Nzhaoxiaoqiang11 <zhaoxiaoqiang11@jd.com>
上级 8cf35797
...@@ -3496,6 +3496,12 @@ static void handle_session(struct ceph_mds_session *session, ...@@ -3496,6 +3496,12 @@ static void handle_session(struct ceph_mds_session *session,
break; break;
case CEPH_SESSION_FLUSHMSG: case CEPH_SESSION_FLUSHMSG:
/* flush cap releases */
spin_lock(&session->s_cap_lock);
if (session->s_num_cap_releases)
ceph_flush_cap_releases(mdsc, session);
spin_unlock(&session->s_cap_lock);
send_flushmsg_ack(mdsc, session, seq); send_flushmsg_ack(mdsc, session, seq);
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册