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