dovecot-2.0: inotify: Give a better error message if user's watc...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 8 21:10:30 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/556855724e6e
changeset: 9590:556855724e6e
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jul 08 14:10:11 2009 -0400
description:
inotify: Give a better error message if user's watch limit exceeds.

diffstat:

1 file changed, 7 insertions(+), 1 deletion(-)
src/lib/ioloop-notify-inotify.c |    8 +++++++-

diffs (18 lines):

diff -r f564209e9396 -r 556855724e6e src/lib/ioloop-notify-inotify.c
--- a/src/lib/ioloop-notify-inotify.c	Wed Jul 08 13:50:32 2009 -0400
+++ b/src/lib/ioloop-notify-inotify.c	Wed Jul 08 14:10:11 2009 -0400
@@ -106,7 +106,13 @@ enum io_notify_result io_add_notify(cons
 		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;
 	}


More information about the dovecot-cvs mailing list