summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server3_1-fops.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2012-10-28 08:30:15 +0530
committerVijay Bellur <vbellur@redhat.com>2012-12-12 00:21:27 -0500
commit1a42faae4967bc0cdb7cefcfbfca45f7d0b10360 (patch)
treef30b52f6336a2f0bcd685eddabf9501f097aef58 /xlators/protocol/server/src/server3_1-fops.c
parent6ae820dc4c79f34a5c381b752a80c4b0169b60bb (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: I5126e20ca1d6aeb71d4d66d14de277729fc8e89f BUG: 866459 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/156 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/1880
Diffstat (limited to 'xlators/protocol/server/src/server3_1-fops.c')
0 files changed, 0 insertions, 0 deletions