]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
man, doveadm: Rename "mailbox cache compress" to "mailbox cache purge"
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 11 Sep 2018 07:10:13 +0000 (10:10 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Nov 2018 12:06:21 +0000 (14:06 +0200)
The "compress" word makes it sound like e.g. zlib compression. The "purge"
word is used for a similar behavior with mdbox purging.

doc/man/doveadm-mailbox.1.in
src/doveadm/doveadm-mail-mailbox-cache.c
src/doveadm/doveadm-mail.c
src/doveadm/doveadm-mail.h

index 275cfdbbed5d7af039ed55eb308c90b6aa9b284f..8e0bfeeb57e95a7a09a062426083e155ff5f795a 100644 (file)
@@ -302,16 +302,15 @@ This command is used to set UID validity, next UID, first recent UID and modific
 Usually this is only ever to be used during migration, or restoring mailbox after disaster.
 Settings these values is highly discouraged, and is not supported for all mail backends.
 .\"------------------------------------------------------------------------
-.SS mailbox cache compress
-.B doveadm mailbox cache compress
+.SS mailbox cache purge
+.B doveadm mailbox cache purge
 [\fB\-A\fP|\fB\-u\fP \fIuser\fP|\fB\-F\fP \fIfile\fP]
 [\fB\-S\fP \fIsocket_path\fP]
 .IR mailbox\ ...
 .PP
-Perform "compression" to the dovecot.index.cache file. Most importantly this
-frees up disk space from mails that were already deleted. Normally there is
-no need to run this command manually, because the compression is also run
-automatically.
+Purge the dovecot.index.cache file. Most importantly this frees up disk space 
+from mails that were already deleted. Normally there i no need to run this 
+command manually, because the compression is also run automatically.
 .\"------------------------------------------------------------------------
 .SS mailbox cache decision
 .B doveadm mailbox cache decision
index cc36962f977061b780c6a8cbb444f038eb09a51a..0df6d366fe37e4958a8a446d72570a9878f7d37b 100644 (file)
@@ -321,13 +321,13 @@ static void cmd_mailbox_cache_remove_init(struct doveadm_mail_cmd_context *_ctx,
        ctx->ctx.search_args = doveadm_mail_build_search_args(args);
 }
 
-static int cmd_mailbox_cache_compress_run_box(struct mailbox_cache_cmd_context *ctx,
-                                             struct mailbox *box)
+static int cmd_mailbox_cache_purge_run_box(struct mailbox_cache_cmd_context *ctx,
+                                          struct mailbox *box)
 {
        struct mailbox_transaction_context *t =
                mailbox_transaction_begin(box,
                                          MAILBOX_TRANSACTION_FLAG_EXTERNAL,
-                                         "mailbox cache compress");
+                                         "mailbox cache purge");
        struct mail_cache *cache = t->box->cache;
        struct mail_cache_compress_lock *lock;
        int ret = 0;
@@ -357,8 +357,8 @@ static int cmd_mailbox_cache_compress_run_box(struct mailbox_cache_cmd_context *
        return ret;
 }
 
-static int cmd_mailbox_cache_compress_run(struct doveadm_mail_cmd_context *_ctx,
-                                         struct mail_user *user)
+static int cmd_mailbox_cache_purge_run(struct doveadm_mail_cmd_context *_ctx,
+                                      struct mail_user *user)
 {
        struct mailbox_cache_cmd_context *ctx =
                container_of(_ctx, struct mailbox_cache_cmd_context, ctx);
@@ -372,15 +372,15 @@ static int cmd_mailbox_cache_compress_run(struct doveadm_mail_cmd_context *_ctx,
                struct mailbox *box;
                if ((ret = cmd_mailbox_cache_open_box(_ctx, user, *boxname, &box)) < 0)
                        break;
-               ret = cmd_mailbox_cache_compress_run_box(ctx, box);
+               ret = cmd_mailbox_cache_purge_run_box(ctx, box);
                mailbox_free(&box);
        }
 
        return ret;
 }
 
-static void cmd_mailbox_cache_compress_init(struct doveadm_mail_cmd_context *_ctx,
-                                           const char *const args[])
+static void cmd_mailbox_cache_purge_init(struct doveadm_mail_cmd_context *_ctx,
+                                        const char *const args[])
 {
        struct mailbox_cache_cmd_context *ctx =
                container_of(_ctx, struct mailbox_cache_cmd_context, ctx);
@@ -412,12 +412,12 @@ static struct doveadm_mail_cmd_context *cmd_mailbox_cache_remove_alloc(void)
        return &ctx->ctx;
 }
 
-static struct doveadm_mail_cmd_context *cmd_mailbox_cache_compress_alloc(void)
+static struct doveadm_mail_cmd_context *cmd_mailbox_cache_purge_alloc(void)
 {
        struct mailbox_cache_cmd_context *ctx =
                doveadm_mail_cmd_alloc(struct mailbox_cache_cmd_context);
-       ctx->ctx.v.init = cmd_mailbox_cache_compress_init;
-       ctx->ctx.v.run = cmd_mailbox_cache_compress_run;
+       ctx->ctx.v.init = cmd_mailbox_cache_purge_init;
+       ctx->ctx.v.run = cmd_mailbox_cache_purge_run;
        ctx->ctx.getopt_args = "";
        doveadm_print_init(DOVEADM_PRINT_TYPE_TABLE);
        return &ctx->ctx;
@@ -449,9 +449,9 @@ DOVEADM_CMD_PARAM('\0', "query", CMD_PARAM_ARRAY, CMD_PARAM_FLAG_POSITIONAL)
 DOVEADM_CMD_PARAMS_END
 };
 
-struct doveadm_cmd_ver2 doveadm_cmd_mailbox_cache_compress = {
-       .name = "mailbox cache compress",
-       .mail_cmd = cmd_mailbox_cache_compress_alloc,
+struct doveadm_cmd_ver2 doveadm_cmd_mailbox_cache_purge = {
+       .name = "mailbox cache purge",
+       .mail_cmd = cmd_mailbox_cache_purge_alloc,
        .usage = DOVEADM_CMD_MAIL_USAGE_PREFIX"<mailbox> [...]",
 DOVEADM_CMD_PARAMS_START
 DOVEADM_CMD_MAIL_COMMON
index c73c7f61b6764f074e6640d4799dfab957686779..add5c26e4a2bae204b6ac7e663531d5a17aac8b8 100644 (file)
@@ -923,7 +923,7 @@ static struct doveadm_cmd_ver2 *mail_commands_ver2[] = {
        &doveadm_cmd_move_ver2,
        &doveadm_cmd_mailbox_cache_decision,
        &doveadm_cmd_mailbox_cache_remove,
-       &doveadm_cmd_mailbox_cache_compress,
+       &doveadm_cmd_mailbox_cache_purge,
        &doveadm_cmd_rebuild_attachments,
 };
 
index cbf533b532689854be17cb7a9c19b2ae69384dcb..9a2c68e74ce738d7613aa035ab5f4f8e3ac26e99 100644 (file)
@@ -197,7 +197,7 @@ extern struct doveadm_cmd_ver2 doveadm_cmd_mailbox_update_ver2;
 extern struct doveadm_cmd_ver2 doveadm_cmd_mailbox_path_ver2;
 extern struct doveadm_cmd_ver2 doveadm_cmd_mailbox_cache_decision;
 extern struct doveadm_cmd_ver2 doveadm_cmd_mailbox_cache_remove;
-extern struct doveadm_cmd_ver2 doveadm_cmd_mailbox_cache_compress;
+extern struct doveadm_cmd_ver2 doveadm_cmd_mailbox_cache_purge;
 extern struct doveadm_cmd_ver2 doveadm_cmd_rebuild_attachments;
 
 #define DOVEADM_CMD_MAIL_COMMON \