]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
quota-fs: With mail_debug=yes, log also additional mount points that are added.
authorTimo Sirainen <tss@iki.fi>
Thu, 8 Jul 2010 12:47:42 +0000 (13:47 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 8 Jul 2010 12:47:42 +0000 (13:47 +0100)
Based on patch by Juergen Obermann.

--HG--
branch : HEAD

src/plugins/quota/quota-fs.c

index 143abdd568be4989ef0b63a40cdc7b3faa32217f..32376c7553eb3c876cd4a1a41205f31be50c0521 100644 (file)
@@ -221,8 +221,9 @@ fs_quota_root_find_mountpoint(struct quota *quota,
        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 @@ static void fs_quota_mount_init(struct fs_quota_root *root,
 #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 @@ static void fs_quota_add_missing_mounts(struct quota *quota)
                        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 @@ static void fs_quota_namespace_added(struct quota *quota,
                                    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);
        }