From cda677a98d039de6381887422d0b482ed412daaf Mon Sep 17 00:00:00 2001 From: Basavanagowda Kanur Date: Thu, 2 Apr 2009 06:09:56 +0530 Subject: mount/fuse to silently send fresh lookup for ESTALEd revalidates. log only in DEBUG level. Signed-off-by: Anand V. Avati --- xlators/mount/fuse/src/fuse-bridge.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/mount') diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 75f4d771a..247a77ea9 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -96,6 +96,9 @@ typedef struct fuse_private fuse_private_t; dict_unref (refs); \ } while (0) +#define GF_SELECT_LOG_LEVEL(_errno) \ + (((_errno == ENOENT) || (_errno == ESTALE))? \ + GF_LOG_DEBUG : GF_LOG_WARNING) typedef struct { void *pool; @@ -296,7 +299,7 @@ need_fresh_lookup (int32_t op_ret, int32_t op_errno, { if (op_ret == -1) { gf_log ("fuse-bridge", - (op_errno == ENOENT)? GF_LOG_DEBUG: GF_LOG_WARNING, + GF_SELECT_LOG_LEVEL(op_errno), "revalidate of %s failed (%s)", loc->path, strerror (op_errno)); return 1; -- cgit