diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2016-06-02 19:45:03 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-06-03 18:58:10 -0700 |
commit | 9e0cdf1d2393d7bdb0eac019e70dce7c5f4f59c9 (patch) | |
tree | 81cf229359880db68b2ca7dea88f8cd4a1199ddd /xlators/features | |
parent | 42b2c259658b017ec08ecf419c7ea83112779236 (diff) |
posix, shard: Use page-aligned buffer for o-direct reads
and also make shard_readv_do() pass the correct flags when
the original fd is opened with O_DIRECT.
Change-Id: Ic2f8ad900743ed3f7cab56948bcf1358d247a311
BUG: 1342171
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/14639
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/shard/src/shard.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c index dfb0374c13e..0967f734ea1 100644 --- a/xlators/features/shard/src/shard.c +++ b/xlators/features/shard/src/shard.c @@ -3013,6 +3013,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, |