summaryrefslogtreecommitdiffstats
path: root/xlators/features/shard/src/shard.c
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2016-06-02 19:45:03 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-06-15 04:15:52 -0700
commitc1dfc0ca9d06ef9560950c6d374f8e9ed0a53fcd (patch)
treead46a08aa5e39832a0026bc8ed751da4a3ad5651 /xlators/features/shard/src/shard.c
parent45ae064a03e9d7864316723d7c258698f03dbc52 (diff)
posix, shard: Use page-aligned buffer for o-direct reads
Backport of: http://review.gluster.org/#/c/14639/ and also make shard_readv_do() pass the correct flags when the original fd is opened with O_DIRECT. Change-Id: I253f74459656b047de652b6aace487c0e2ac71f6 BUG: 1342903 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14650 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/features/shard/src/shard.c')
-rw-r--r--xlators/features/shard/src/shard.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index 14177a3b77f..df841243926 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -3010,6 +3010,9 @@ shard_readv_do (call_frame_t *frame, xlator_t *this)
SHARD_SET_ROOT_FS_ID (frame, local);
+ if (fd->flags & O_DIRECT)
+ local->flags = O_DIRECT;
+
while (cur_block <= last_block) {
if (wind_failed) {
shard_readv_do_cbk (frame, (void *) (long) 0, this, -1,