ceph: properly protect session cap_gen and cap_ttl
Get series with b4
b4 am 1326484197.3334.27.camel@doinkVersions newest first
- v1 Latest4 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | ceph: create a new session lock to avoid lock inversionfs/ fs/ fs/ +1 more | +7 | 1 reply | |
| 2/4 | ceph: don't reset s_cap_ttl to zerofs/ | +0 | 0 replies | |
| 3/4 | ceph: make session->s_cap_gen atomicfs/ fs/ fs/ +2 more | +3 | 2 replies | |
| 4/4 | ceph: make session->s_cap_ttl atomicfs/ fs/ fs/ +1 more | +2 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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