enum quota_alloc_result (*test_alloc)(
struct quota_transaction_context *ctx, uoff_t size,
const char **error_r);
+ bool vsizes:1;
};
struct quota_settings {
uoff_t max_mail_size;
unsigned int max_messages_per_mailbox;
const char *quota_exceeded_msg;
- bool vsizes:1;
};
struct quota_rule {
the mail at the same time. In here we'll just save the message's
physical size and do the quota freeing later when the message was
known to be expunged. */
- if (quser->quota->set->vsizes)
+ if (quser->quota->vsizes)
ret = mail_get_virtual_size(_mail, &size);
else
ret = mail_get_physical_size(_mail, &size);
/* FIXME: it's not ideal that we do the vsize update here, but
this is the easiest place for it for now.. maybe the mail
size checking code could be moved to lib-storage */
- if (ibox->vsize_update != NULL && quser->quota->set->vsizes)
+ if (ibox->vsize_update != NULL && quser->quota->vsizes)
index_mailbox_vsize_hdr_expunge(ibox->vsize_update, uid, *sizep);
return;
}
}
if (!mail_set_uid(qbox->expunge_qt->tmp_mail, uid))
;
- else if (!quser->quota->set->vsizes) {
+ else if (!quser->quota->vsizes) {
if (mail_get_physical_size(qbox->expunge_qt->tmp_mail, &size) == 0) {
quota_free_bytes(qbox->expunge_qt, size);
return;
size, use this for all backends. This is not ideal, but
works. */
if (root->set->backend->use_vsize)
- quota->set->vsizes = TRUE;
+ quota->vsizes = TRUE;
}
}
*quota_r = quota;
static int quota_get_mail_size(struct quota_transaction_context *ctx,
struct mail *mail, uoff_t *size_r)
{
- if (ctx->quota->set->vsizes)
+ if (ctx->quota->vsizes)
return mail_get_virtual_size(mail, size_r);
else
return mail_get_physical_size(mail, size_r);