This will crash the clients more gracefully instead of in ~xlist(),
and this will be easier to debug the root cause and get to know
exactly which list is not empty.
Fixes: https://tracker.ceph.com/issues/56698
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit
687d4b77e5615e4a76da862c1286eb1d6bb9f559)
MetaSession(mds_rank_t mds_num, ConnectionRef con, const entity_addrvec_t& addrs)
: mds_num(mds_num), con(con), addrs(addrs) {
}
+ ~MetaSession() {
+ ceph_assert(caps.empty());
+ ceph_assert(dirty_list.empty());
+ ceph_assert(flushing_caps.empty());
+ ceph_assert(requests.empty());
+ ceph_assert(unsafe_requests.empty());
+ }
xlist<Inode*> &get_dirty_list() { return dirty_list; }