From ea982a764b7cb447eb866129fef2cfafaa48eb6a Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Wed, 20 Mar 2013 11:06:19 +0530 Subject: performance/write-behind: Enable write-behind when strict_O_DIRECT is not set. When open() with O_DIRECT happens, write-behind was being disabled for the fd irrespective of strict_O_DIRECT option. This commit disables write-behind only when strict_O_DIRECT is enabled. Change-Id: Ieef180e52910c3bf64d46b26b0e5dc3b8542f6d2 BUG: 923556 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/4697 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/performance/write-behind/src/write-behind.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xlators/performance') diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index ebb8410a..6a2fcc40 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -1254,8 +1254,7 @@ wb_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, struct iovec *vector, if (fd->flags & (O_SYNC|O_DSYNC|o_direct)) wb_disabled = 1; - if (flags & (O_SYNC|O_DSYNC|O_DIRECT)) - /* O_DIRECT flag in params of writev must _always_ be honored */ + if (flags & (O_SYNC|O_DSYNC|o_direct)) wb_disabled = 1; if (wb_disabled) -- cgit