diff options
author | Anand Avati <avati@redhat.com> | 2012-09-30 13:26:59 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-10-01 16:39:09 -0700 |
commit | 5f9ad8a2bcc18d8ae828140d20203de496b371a4 (patch) | |
tree | 368d2dab4f1d1ca45d9ffbed4b425bb47859cb4b /xlators/storage/posix/src/posix.h | |
parent | 5b896df0543e484b4de4de0a6ffa1053c5f92273 (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: 837495
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4006
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix.h')
-rw-r--r-- | xlators/storage/posix/src/posix.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h index 193d5588605..6f96e49d18f 100644 --- a/xlators/storage/posix/src/posix.h +++ b/xlators/storage/posix/src/posix.h @@ -156,8 +156,6 @@ int posix_entry_create_xattr_set (xlator_t *this, const char *path, dict_t *dict); int posix_fd_ctx_get (fd_t *fd, xlator_t *this, struct posix_fd **pfd); -int posix_fd_ctx_get_off (fd_t *fd, xlator_t *this, struct posix_fd **pfd, - off_t off); void posix_fill_ino_from_gfid (xlator_t *this, struct iatt *buf); gf_boolean_t posix_special_xattr (char **pattern, char *key); |