dovecot-1.1: kqueue: If opening a file fails with ESTALE, don't ...

dovecot at dovecot.org dovecot at dovecot.org
Sat May 17 01:12:39 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/20c6e9545d56
changeset: 7527:20c6e9545d56
user:      Timo Sirainen <tss at iki.fi>
date:      Sat May 17 01:12:34 2008 +0300
description:
kqueue: If opening a file fails with ESTALE, don't log an error. It probably
just means the file was deleted by another NFS client.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/lib/ioloop-notify-kqueue.c |    4 +++-

diffs (14 lines):

diff -r a957567706ec -r 20c6e9545d56 src/lib/ioloop-notify-kqueue.c
--- a/src/lib/ioloop-notify-kqueue.c	Sat May 17 01:00:22 2008 +0300
+++ b/src/lib/ioloop-notify-kqueue.c	Sat May 17 01:12:34 2008 +0300
@@ -118,7 +118,9 @@ enum io_notify_result io_add_notify(cons
 
 	fd = open(path, O_RDONLY);
 	if (fd == -1) {
-		if (errno != ENOENT)
+		/* ESTALE could happen with NFS. Don't bother giving an error
+		   message then. */
+		if (errno != ENOENT && errno != ESTALE)
 			i_error("open(%s) for kq notify failed: %m", path);
 		return IO_NOTIFY_NOTFOUND;
 	}


More information about the dovecot-cvs mailing list