提交 4cafd040 编写于 作者: X Xiubo Li 提交者: Ilya Dryomov

ceph: force updating the msg pointer in non-split case

When the MClientSnap reqeust's op is not CEPH_SNAP_OP_SPLIT the
request may still contain a list of 'split_realms', and we need
to skip it anyway. Or it will be parsed as a corrupt snaptrace.

Cc: stable@vger.kernel.org
Link: https://tracker.ceph.com/issues/61200Reported-by: NFrank Schilder <frans@dtu.dk>
Signed-off-by: NXiubo Li <xiubli@redhat.com>
Reviewed-by: NIlya Dryomov <idryomov@gmail.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 9aaa7eb0
...@@ -1111,6 +1111,19 @@ void ceph_handle_snap(struct ceph_mds_client *mdsc, ...@@ -1111,6 +1111,19 @@ void ceph_handle_snap(struct ceph_mds_client *mdsc,
continue; continue;
adjust_snap_realm_parent(mdsc, child, realm->ino); adjust_snap_realm_parent(mdsc, child, realm->ino);
} }
} else {
/*
* In the non-split case both 'num_split_inos' and
* 'num_split_realms' should be 0, making this a no-op.
* However the MDS happens to populate 'split_realms' list
* in one of the UPDATE op cases by mistake.
*
* Skip both lists just in case to ensure that 'p' is
* positioned at the start of realm info, as expected by
* ceph_update_snap_trace().
*/
p += sizeof(u64) * num_split_inos;
p += sizeof(u64) * num_split_realms;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册