aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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/linux
parentlibceph: allocate ceph_osd with GFP_NOFAIL (diff)
downloadlinux-dev-9dd2845ccb40452d4ac943231ea34aade4a02c68.tar.xz
linux-dev-9dd2845ccb40452d4ac943231ea34aade4a02c68.zip
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/linux')
-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 */