]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: add spinlock around osd->o_requests
authorJeff Layton <jlayton@kernel.org>
Mon, 14 Mar 2022 19:47:18 +0000 (15:47 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 15 Aug 2022 12:51:40 +0000 (14:51 +0200)
commite2c4ad944085e3dddec980e50569bc8234feb3c0
tree4db65d08886db91f987f41a014c36a0510d7383f
parent311f1412f64c067e083ad2e5f33c72e50897ffcc
libceph: add spinlock around osd->o_requests

In a later patch, we're going to need to search for a request in
the rbtree, but taking the o_mutex is inconvenient as we already
hold the con mutex at the point where we need it.

Add a new spinlock that we take when inserting and erasing entries from
the o_requests tree. Search of the rbtree can be done with either the
mutex or the spinlock, but insertion and removal requires both.

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
include/linux/ceph/osd_client.h
net/ceph/osd_client.c