diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-10-08 14:11:15 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-12-12 00:19:38 -0500 |
commit | dae281f7ed9fe1a8e57eaef5eeaebe44990fae8a (patch) | |
tree | 86bcd3799a0a0be52cc3c55aa68e8d7490c54d8b /xlators/cluster/afr/src/afr-transaction.c | |
parent | feae7bdfbcafdaa10fbde928a62e7646222fe56a (diff) |
linux-aio: fixes while setting O_DIRECT flag
Linux AIO needs O_DIRECT to be set for effective operation. O_DIRECT
in turn has constraints on when it can work (offset, size alignment)
So use O_DIRECT (unless instructed by application) only when offset
and size alignments match. Else, io_submit() will happen over
non-O_DIRECT fd, effectively blocking till the completion of the IO.
Also fix a multithreading bug where detection/setting of O_DIRECT
for a request was not atomic with io_submit() of that request.
Change-Id: I190017e8bc78217429aff0714dca224cbe6f251d
BUG: 859406
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.org/4006
Tested-by: Amar Tumballi <amarts@redhat.com>
Original-Author: Anand Avati <avati@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/61
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/1874
Diffstat (limited to 'xlators/cluster/afr/src/afr-transaction.c')
0 files changed, 0 insertions, 0 deletions