to do and it's internally used to figure out whether there have
been some changes and that quota_warnings should be checked. */
bool auto_updating:1;
- /* If user has unlimited quota, disable quota tracking */
- bool disable_unlimited_tracking:1;
/* Set while quota is being recalculated to avoid recursion. */
bool recounting:1;
/* Did we already check quota_over_status correctness? */
DEF(STR, quota_driver),
DEF(STR, quota_args),
DEF(BOOL, quota_ignore),
+ DEF(BOOL, quota_ignore_unlimited),
DEF(BOOL, quota_hidden),
DEF(SIZE, quota_storage_size),
DEF(UINT, quota_storage_percentage),
.quota_driver = "count",
.quota_args = "",
.quota_ignore = FALSE,
+ .quota_ignore_unlimited = FALSE,
.quota_hidden = FALSE,
.quota_storage_size = SET_SIZE_UNLIMITED,
.quota_storage_percentage = 100,
this differs from unlimited quota, which still tracks the quota,
even if it is not enforced. */
bool quota_ignore;
+ /* IF TRUE, quota is ignored only when quota is unlimited. */
+ bool quota_ignore_unlimited;
/* Quota root is hidden (to e.g. IMAP GETQUOTAROOT) */
bool quota_hidden;
/* Quota storage size is counted as:
static ARRAY(const struct quota_backend*) quota_backends;
-static void ignoreunlim_param_handler(struct quota_root *_root, const char *param_value);
static void noenforcing_param_handler(struct quota_root *_root, const char *param_value);
-struct quota_param_parser quota_param_ignoreunlimited = {.param_name = "ignoreunlimited", .param_handler = ignoreunlim_param_handler};
struct quota_param_parser quota_param_noenforcing = {.param_name = "noenforcing", .param_handler = noenforcing_param_handler};
static enum quota_alloc_result quota_default_test_alloc(
const char **error_r)
{
const struct quota_param_parser default_params[] = {
- quota_param_ignoreunlimited,
quota_param_noenforcing,
{.param_name = NULL}
};
}
if (root->set->quota_storage_size == 0 &&
root->set->quota_message_count == 0 &&
- root->disable_unlimited_tracking) {
+ root->set->quota_ignore_unlimited) {
quota_root_deinit(root);
return 0;
}
ctx->recalculate = recalculate;
}
-static void ignoreunlim_param_handler(struct quota_root *_root, const char *param_value ATTR_UNUSED)
-{
- _root->disable_unlimited_tracking = TRUE;
-}
-
static void noenforcing_param_handler(struct quota_root *_root, const char *param_value ATTR_UNUSED)
{
_root->no_enforcing = TRUE;
};
extern struct quota_param_parser quota_param_hidden;
-extern struct quota_param_parser quota_param_ignoreunlimited;
extern struct quota_param_parser quota_param_noenforcing;
extern struct quota_param_parser quota_param_ns;