summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2018-01-12 17:19:29 +0000
committerIlya Dryomov <idryomov@gmail.com>2018-04-02 11:17:53 +0200
commitd557c48db730eaab6b75d4af332c135309b7a6a4 (patch)
tree74b28856b9052a36b588d9baf77b5781f8479c97 /fs/ceph/mds_client.c
parente3161f17d92699ce6ca3b7988131b10ad4035cf9 (diff)
downloadop-kernel-dev-d557c48db730eaab6b75d4af332c135309b7a6a4.zip
op-kernel-dev-d557c48db730eaab6b75d4af332c135309b7a6a4.tar.gz
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.c')
-rw-r--r--fs/ceph/mds_client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 1c9877c..5ece2e6 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -3609,6 +3609,7 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc)
atomic_set(&mdsc->num_sessions, 0);
mdsc->max_sessions = 0;
mdsc->stopping = 0;
+ atomic64_set(&mdsc->quotarealms_count, 0);
mdsc->last_snap_seq = 0;
init_rwsem(&mdsc->snap_rwsem);
mdsc->snap_realms = RB_ROOT;
OpenPOWER on IntegriCloud