Skip to content

ceph: fix dead lock and double lock

[email protected] ceph-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v22 patches 5 repliesSuperseded
  3. v11 patch 5 repliesSuperseded

Changes in v3 from the cover letter

- fix putting the cap refs leak

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ceph: add ceph_async_put_cap_refs to avoid double lock and deadlockfs/ceph/caps.c fs/ceph/inode.c fs/ceph/mds_client.c +1 more+85 -142 replies
2/2ceph: do not check the caps when reconnecting to mdsfs/ceph/caps.c fs/ceph/dir.c fs/ceph/file.c +3 more+25 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] ceph: fix dead lock and double lock

From: Xiubo Li <[email protected]>

Changed in V2:
- do not check the caps when reconnecting to mds
- switch ceph_async_check_caps() to ceph_async_put_cap_refs()

Changed in V3:
- fix putting the cap refs leak

By adding the put_cap_refs's queue work we can avoid the 'mdsc->mutex' and 'session->s_mutex' double lock issue and also the dead lock issue of them. There at least 10+ places have the above issues and most of them are caused by calling the ceph_mdsc_put_request() when releasing the 'req'.

Xiubo Li (2):
ceph: add ceph_async_put_cap_refs to avoid double lock and deadlock
ceph: do not check the caps when reconnecting to mds

 fs/ceph/caps.c       | 98 +++++++++++++++++++++++++++++++++++++++++++++-------
 fs/ceph/dir.c        |  2 +-
 fs/ceph/file.c       |  2 +-
 fs/ceph/inode.c      |  3 ++
 fs/ceph/mds_client.c | 14 +++++---
 fs/ceph/mds_client.h |  3 +-
 fs/ceph/super.h      |  7 ++++
 7 files changed, 110 insertions(+), 19 deletions(-)
Signature · 1 line
1.8.3.1