summaryrefslogtreecommitdiff
path: root/fs/ceph/mds_client.h
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2018-01-12 20:19:29 +0300
committerIlya Dryomov <idryomov@gmail.com>2018-04-02 12:17:53 +0300
commitd557c48db730eaab6b75d4af332c135309b7a6a4 (patch)
tree74b28856b9052a36b588d9baf77b5781f8479c97 /fs/ceph/mds_client.h
parente3161f17d92699ce6ca3b7988131b10ad4035cf9 (diff)
downloadlinux-d557c48db730eaab6b75d4af332c135309b7a6a4.tar.xz
ceph: quota: add counter for snaprealms with quota
By keeping a counter with the number of snaprealms that have quota set allows to optimize the functions that need to walk throught the realms hierarchy looking for quotas. Thus, if this counter is zero it's safe to assume that there are no realms with quota. Signed-off-by: Luis Henriques <lhenriques@suse.com> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r--fs/ceph/mds_client.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index 2a67c8b01ae6..2ec3b5b35067 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -314,6 +314,8 @@ struct ceph_mds_client {
int max_sessions; /* len of s_mds_sessions */
int stopping; /* true if shutting down */
+ atomic64_t quotarealms_count; /* # realms with quota */
+
/*
* snap_rwsem will cover cap linkage into snaprealms, and
* realm snap contexts. (later, we can do per-realm snap