diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2012-10-28 07:31:20 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-11-20 00:30:25 -0800 |
commit | 65cc8cb531456de934e8ba3175430e8fcb304ca5 (patch) | |
tree | 0a41494a96bbbf313bfe56b0f5fea993d6d9c59d /rfc.sh | |
parent | 18851652c9e3d566fd82fac91d67792d7c221f6b (diff) |
storage/posix: Make rchecksum O_DIRECT friendly
Problem:
When posix-aio is enabled to perform aio fd is set with O_DIRECT
whenever possible in read, writev fops. Rchecksum does not take
this into account. If either offset/size/memory-buf passed to
pread in rchecksum fop is not aligned, pread fails with EINVAL.
Fix:
Before doing pread necessary O_DIRECT manipulation is done when
aio is enabled. Memory buffer passed to pread is now page-aligned.
Test:
1) Create replica volume with aio enabled.
2) dd if=/dev/urandom of=a bs=1M count=1
3) kill one of the bricks in the replica pair
4) dd if=/dev/urandom of=a bs=1M count=1
5) bring back the brick. Self-heal succeeds after the change.
The test above checks both rchecksum, writev fops that were
changed in this patch.
Change-Id: I186099a2854d4864c5b48086ab7bc5f1a7b27313
BUG: 866459
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4134
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'rfc.sh')
0 files changed, 0 insertions, 0 deletions