]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
inotify: Give a better error message if user's watch limit exceeds.
authorTimo Sirainen <tss@iki.fi>
Wed, 8 Jul 2009 18:10:11 +0000 (14:10 -0400)
committerTimo Sirainen <tss@iki.fi>
Wed, 8 Jul 2009 18:10:11 +0000 (14:10 -0400)
--HG--
branch : HEAD

src/lib/ioloop-notify-inotify.c

index 2addb4d3b804bd5d6fde873de46eedd8959aef6d..a5c168aad8ea75884b50bff1c29ffad85403aad6 100644 (file)
@@ -106,7 +106,13 @@ enum io_notify_result io_add_notify(const char *path, io_callback_t *callback,
                if (errno == ENOENT || errno == ESTALE)
                        return IO_NOTIFY_NOTFOUND;
 
-               i_error("inotify_add_watch(%s) failed: %m", path);
+               if (errno != ENOSPC)
+                       i_error("inotify_add_watch(%s) failed: %m", path);
+               else {
+                       i_warning("Inotify watch limit for user exceeded, "
+                                 "disabling. Increase "
+                                 "/proc/sys/fs/inotify/max_user_watches");
+               }
                ctx->disabled = TRUE;
                return IO_NOTIFY_NOSUPPORT;
        }