Mercurial > dovecot > core-2.2
changeset 11755:4db139722e4f HEAD
quota-fs: With mail_debug=yes, log also additional mount points that are added.
Based on patch by Juergen Obermann.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 08 Jul 2010 13:47:42 +0100 |
parents | dcd740f453a4 |
children | 5113bada22b2 |
files | src/plugins/quota/quota-fs.c |
diffstat | 1 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/quota/quota-fs.c Wed Jul 07 16:31:25 2010 +0100 +++ b/src/plugins/quota/quota-fs.c Thu Jul 08 13:47:42 2010 +0100 @@ -221,8 +221,9 @@ return empty; } -static void fs_quota_mount_init(struct fs_quota_root *root, - struct fs_quota_mountpoint *mount) +static void +fs_quota_mount_init(struct fs_quota_root *root, + struct fs_quota_mountpoint *mount, const char *dir) { struct quota_root *const *roots; unsigned int i, count; @@ -242,6 +243,13 @@ #endif root->mount = mount; + if (root->root.quota->set->debug) { + i_debug("fs quota add mailbox dir = %s", dir); + i_debug("fs quota block device = %s", mount->device_path); + i_debug("fs quota mount point = %s", mount->mount_path); + i_debug("fs quota mount type = %s", mount->type); + } + /* if there are more unused quota roots, copy this mount to them */ roots = array_get(&root->root.quota->roots, &count); for (i = 0; i < count; i++) { @@ -268,8 +276,10 @@ continue; mount = fs_quota_mountpoint_get(root->storage_mount_path); - if (mount != NULL) - fs_quota_mount_init(root, mount); + if (mount != NULL) { + fs_quota_mount_init(root, mount, + root->storage_mount_path); + } } } @@ -284,16 +294,9 @@ MAILBOX_LIST_PATH_TYPE_MAILBOX); mount = fs_quota_mountpoint_get(dir); if (mount != NULL) { - if (quota->set->debug) { - i_debug("fs quota add mailbox dir = %s", dir); - i_debug("fs quota block device = %s", mount->device_path); - i_debug("fs quota mount point = %s", mount->mount_path); - i_debug("fs quota mount type = %s", mount->type); - } - root = fs_quota_root_find_mountpoint(quota, mount); if (root != NULL && root->mount == NULL) - fs_quota_mount_init(root, mount); + fs_quota_mount_init(root, mount, dir); else fs_quota_mountpoint_free(mount); }