From: Timo Sirainen Date: Wed, 8 Jul 2009 18:10:11 +0000 (-0400) Subject: inotify: Give a better error message if user's watch limit exceeds. X-Git-Tag: 2.0.alpha1~462 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7398cd92a003144358c121bdea63fba35b884ae;p=thirdparty%2Fdovecot%2Fcore.git inotify: Give a better error message if user's watch limit exceeds. --HG-- branch : HEAD --- diff --git a/src/lib/ioloop-notify-inotify.c b/src/lib/ioloop-notify-inotify.c index 2addb4d3b8..a5c168aad8 100644 --- a/src/lib/ioloop-notify-inotify.c +++ b/src/lib/ioloop-notify-inotify.c @@ -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; }