diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2016-06-17 14:14:22 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-06-27 08:17:12 -0700 |
commit | 7cbd3be5f8c5d70226e732a151a487eb047662b2 (patch) | |
tree | 662851c4b4699c3230862b3b0897d81cad4b5001 /xlators/features/shard | |
parent | cae76bad7a31c60a3bf17fa1e5005ec5975bf91e (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>
Change-Id: Ic774d2c21efc05566a1b842f7dce24509cbeaac4
BUG: 1347553
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/14753
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>
Diffstat (limited to 'xlators/features/shard')
-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, |