summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-04-28 16:07:26 +0200
committerIlya Dryomov <idryomov@gmail.com>2016-05-26 01:12:30 +0200
commit9dd2845ccb40452d4ac943231ea34aade4a02c68 (patch)
treed7c5be5f87c642b45a92eec573a657207b27b899 /include
parent7a28f59bf9fb220cdf56ac6ab539fc4a0ae59414 (diff)
downloadlinux-9dd2845ccb40452d4ac943231ea34aade4a02c68.tar.bz2
libceph: protect osdc->osd_lru list with a spinlock
OSD client is getting moved from the big per-client lock to a set of per-session locks. The big rwlock would only be held for read most of the time, so a global osdc->osd_lru needs additional protection. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ceph/osd_client.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 2415dc0cb008..486d681694c4 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -224,6 +224,7 @@ struct ceph_osd_client {
struct mutex request_mutex;
struct rb_root osds; /* osds */
struct list_head osd_lru; /* idle osds */
+ spinlock_t osd_lru_lock;
u64 last_tid; /* tid of last request */
struct rb_root requests; /* pending requests */
struct list_head req_lru; /* in-flight lru */