|
The solution of this problem could be common with LU-16660. In my case I also wanted to know whether quotas enforced or not. The problem is that to be 100% sure that quotas are disabled we need to ask all "quota slaves", i.e. all OSTs and MDTs. It is too expensive to ask all targets, so probably it is worth to have some common flag on MDS0 that is set to "TRUE" only when quota on all targets is disabled(quota_slave=none).
|
|
In LU-16771 there was also a performance issue related to an application getting the project quota repeatedly due to many statfs() syscalls, and no cache for the project quota on the clients. I think it is reasonable to cache the "quota enabled/disabled" state on the client and MDS, along with the quota usage for an ID+type for a short time (same as statfs), as long as these are not used to make actual decisions about IO. For these cases, the values are mostly cosmetic, so caching them for a few seconds is fine.
There would need to be a tunable like "enable_quota_cache=0" to disable the cache for sanity-quota to work properly when fetching the quota, or in case of problems in the field.
|