Re: [PATCH v4 0/5] ceph: reduce mdsc->mutex contention in the cephfs kclient
Alex Markuze <[email protected]>
| Newsgroups | org.kernel.vger.ceph-devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Xiubo, Patches 1-4 look good — the xarray replacement and the wait_list_lock are clean, and the mutex narrowing is the right direction. One blocker in patch 5: replay_unsafe_requests() calls list_del_init(&req->r_unsafe_item) before parking the request on the local walk list via r_aux_item. That permanently removes the request from session->s_unsafe. After replay, the request is no longer tracked as unsafe — subsequent reconnects won't replay it, and cleanup_session_requests() can't drop it with -EIO on session teardown. The request can get stuck in the xarray with no error surfaced to userspace. The fix is to not unlink from s_unsafe at all — just add to the local list via r_aux_item and leave r_unsafe_item in place. That's the whole point of having r_aux_item. Also r_aux_item is added to the struct in patch 4 but never initialized with INIT_LIST_HEAD() in ceph_mdsc_create_request(). Could you respin as v5? -- Alex Markuze