From 84ebee8c20ce667a5ec5fddc0aa47f8b5bef39f8 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 18 Oct 2011 10:30:42 +0530 Subject: build: warning suppression (round n) with this patch, there are no more warnings with gcc (GCC) 4.6.1 20110908 Change-Id: Ice0d52d304b9846395f8a4a191c98eb53125f792 BUG: 2550 Reviewed-on: http://review.gluster.com/607 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/performance/io-cache/src/io-cache.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'xlators/performance/io-cache') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index b848910c..8b32a4f0 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -649,6 +649,10 @@ ioc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, || ((table->max_file_size > 0) && (table->max_file_size < ioc_inode->ia_size))) { ret = fd_ctx_set (fd, this, 1); + if (ret) + gf_log (this->name, GF_LOG_WARNING, + "%s: failed to set fd ctx", + local->file_loc.path); } } ioc_inode_unlock (ioc_inode); @@ -657,16 +661,26 @@ ioc_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this, (uint64_t)(long)ioc_inode); /* If O_DIRECT open, we disable caching on it */ - if (local->flags & O_DIRECT) + if (local->flags & O_DIRECT) { /* * O_DIRECT is only for one fd, not the inode * as a whole */ ret = fd_ctx_set (fd, this, 1); + if (ret) + gf_log (this->name, GF_LOG_WARNING, + "%s: failed to set fd ctx", + local->file_loc.path); + } /* if weight == 0, we disable caching on it */ - if (!weight) + if (!weight) { /* we allow a pattern-matched cache disable this way */ ret = fd_ctx_set (fd, this, 1); + if (ret) + gf_log (this->name, GF_LOG_WARNING, + "%s: failed to set fd ctx", + local->file_loc.path); + } } -- cgit