12a457
From 89f12813b68f4fa7e469534037f7630d53dc79f0 Mon Sep 17 00:00:00 2001
12a457
From: Krutika Dhananjay <kdhananj@redhat.com>
12a457
Date: Fri, 13 May 2016 12:54:37 +0530
12a457
Subject: [PATCH 146/158] Revert "features/shard: Make o-direct writes work with sharding"
12a457
12a457
This reverts commit cda89700fc54c391bfca23cbb0c68224ae3f576f.
12a457
12a457
Change-Id: I6fe05545fdd0f1a30c121060ff3c5b5a270fedbb
12a457
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
12a457
Reviewed-on: https://code.engineering.redhat.com/gerrit/74265
12a457
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
12a457
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
12a457
---
12a457
 xlators/features/shard/src/shard.c |    6 ------
12a457
 1 files changed, 0 insertions(+), 6 deletions(-)
12a457
12a457
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
12a457
index 78bb82d..c7a57e0 100644
12a457
--- a/xlators/features/shard/src/shard.c
12a457
+++ b/xlators/features/shard/src/shard.c
12a457
@@ -3591,7 +3591,6 @@ shard_common_inode_write_do (call_frame_t *frame, xlator_t *this)
12a457
         shard_local_t  *local             = NULL;
12a457
         struct iovec   *vec               = NULL;
12a457
         gf_boolean_t    wind_failed       = _gf_false;
12a457
-        gf_boolean_t    odirect           = _gf_false;
12a457
         off_t           orig_offset       = 0;
12a457
         off_t           shard_offset      = 0;
12a457
         off_t           vec_offset        = 0;
12a457
@@ -3622,9 +3621,6 @@ shard_common_inode_write_do (call_frame_t *frame, xlator_t *this)
12a457
                 return 0;
12a457
         }
12a457
 
12a457
-        if ((fd->flags & O_DIRECT) && (local->fop == GF_FOP_WRITE))
12a457
-                odirect = _gf_true;
12a457
-
12a457
         while (cur_block <= last_block) {
12a457
                 if (wind_failed) {
12a457
                         shard_common_inode_write_do_cbk (frame,
12a457
@@ -3682,8 +3678,6 @@ shard_common_inode_write_do (call_frame_t *frame, xlator_t *this)
12a457
                                                                  NULL, NULL);
12a457
                                 goto next;
12a457
                         }
12a457
-                        if (odirect)
12a457
-                                local->flags |= O_SYNC;
12a457
                 }
12a457
 
12a457
                 shard_common_inode_write_wind (frame, this, anon_fd,
12a457
-- 
12a457
1.7.1
12a457