From 3f6e5e670b7c1e30c64f2f11419947bd8982d51b Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 4 Aug 2010 22:24:51 +0000 Subject: performance/io-cache: Disable caching when files are opened with GF_OPEN_NOWB Signed-off-by: Raghavendra G Signed-off-by: Anand V. Avati BUG: 1168 (Disable caching when files are opened with GF_OPEN_NOWB) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1168 --- xlators/performance/io-cache/src/io-cache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xlators/performance/io-cache/src/io-cache.c') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index e4ca446cf5b..211f47ece8a 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -555,6 +555,11 @@ ioc_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, fd_ctx_set (fd, this, 1); } + if ((local->wbflags & GF_OPEN_NOWB) != 0) { + /* disable caching as asked by NFS */ + fd_ctx_set (fd, this, 1); + } + /* weight = 0, we disable caching on it */ if (weight == 0) { /* we allow a pattern-matched cache disable this way -- cgit