ceph: quota: add counter for snaprealms with quota
authorLuis Henriques <lhenriques@suse.com>
Fri, 12 Jan 2018 17:19:29 +0000 (17:19 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 2 Apr 2018 09:17:53 +0000 (11:17 +0200)
commitd557c48db730eaab6b75d4af332c135309b7a6a4
tree74b28856b9052a36b588d9baf77b5781f8479c97
parente3161f17d92699ce6ca3b7988131b10ad4035cf9
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>
fs/ceph/inode.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h
fs/ceph/quota.c
fs/ceph/super.h