summaryrefslogtreecommitdiff
path: root/fs/ceph/mds_client.h
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2015-01-09 17:00:42 +0800
committerIlya Dryomov <idryomov@gmail.com>2015-02-19 13:31:38 +0300
commit86d8f67b26a8b30228b5177b7e594bbc89798a23 (patch)
tree8d2c95e94f1718806d0aed91854394ec5cfabe5b /fs/ceph/mds_client.h
parentc4d4a582c538e890f09c338bc3063c28dfdc9ae5 (diff)
ceph: avoid block operation when !TASK_RUNNING (ceph_mdsc_close_sessions)
use an atomic variable to track number of sessions, this can avoid block operation inside wait loops. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r--fs/ceph/mds_client.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index a87b92f500bb..1875b5d985c6 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -273,6 +273,7 @@ struct ceph_mds_client {
struct list_head waiting_for_map;
struct ceph_mds_session **sessions; /* NULL for mds if no session */
+ atomic_t num_sessions;
int max_sessions; /* len of s_mds_sessions */
int stopping; /* true if shutting down */