Skip to content

ceph: properly protect session cap_gen and cap_ttl

Alex Elder ceph-devel 1 version In review

Get series with b4
b4 am 1326484197.3334.27.camel@doink

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ceph: create a new session lock to avoid lock inversionfs/ceph/caps.c fs/ceph/dir.c fs/ceph/mds_client.c +1 more+7 -41 reply
2/4ceph: don't reset s_cap_ttl to zerofs/ceph/mds_client.c+0 -00 replies
3/4ceph: make session->s_cap_gen atomicfs/ceph/caps.c fs/ceph/dir.c fs/ceph/inode.c +2 more+3 -32 replies
4/4ceph: make session->s_cap_ttl atomicfs/ceph/caps.c fs/ceph/dir.c fs/ceph/mds_client.c +1 more+2 -21 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] ceph: properly protect session cap_gen and cap_ttl

This series addresses a few issues with the use of the ceph_mds_session s_cap_gen and s_cap_ttl fields.

These two fields are used for handling session timeouts, etc. At times they need to be updated or sampled together, and until now this has been done under the protection of the session's s_cap_lock. However this results in a possible circular locking dependency. This is fixed by introducing a new "inner" lock specifically for protecting this case.

In addition, since these fields are used for synchronization (and especially since one is 64 bits), convert them use atomic types.

-Alex