summaryrefslogtreecommitdiffstats
path: root/xlators/performance/quick-read/src
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2011-02-03 01:56:28 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-18 23:32:37 -0800
commitc47961cc18f7bbc1b46e1cdf5662b8ec409065e5 (patch)
tree6c1440d3f2ee3c29b72bf85f84fc2f2ee85c2c61 /xlators/performance/quick-read/src
parentbf767b85e3e92ec4bad52c6af141299d2afa4480 (diff)
performance/quick-read: disable caching for fds opened with GF_OPEN_NOWB flags.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2240 (Solaris client hangs on file read operations) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2240
Diffstat (limited to 'xlators/performance/quick-read/src')
-rw-r--r--xlators/performance/quick-read/src/quick-read.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 9b0afe1f55b..cc83772a55e 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -646,7 +646,8 @@ qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
if (!content_cached || ((flags & O_ACCMODE) == O_WRONLY)
|| ((flags & O_TRUNC) == O_TRUNC)
- || ((flags & O_DIRECT) == O_DIRECT)) {
+ || ((flags & O_DIRECT) == O_DIRECT)
+ || ((wbflags & GF_OPEN_NOWB) != 0)) {
LOCK (&qr_fd_ctx->lock);
{
/*
@@ -655,7 +656,8 @@ qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
*/
qr_fd_ctx->open_in_transit = 1;
- if ((flags & O_DIRECT) == O_DIRECT) {
+ if (((flags & O_DIRECT) == O_DIRECT)
+ || ((wbflags & GF_OPEN_NOWB)) != 0) {
qr_fd_ctx->disabled = 1;
}
}