diff options
author | Kaleb S KEITHLEY <kkeithle@redhat.com> | 2015-12-07 10:22:05 -0500 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2015-12-22 09:11:30 -0800 |
commit | 76f1680a2de05420934e131f934f3895fbe50db8 (patch) | |
tree | 54d7234fa2bef0f9adb43a15ef65db112b0b1ca4 /xlators/storage/posix | |
parent | 439de31320315872d988720991e9baaead8712db (diff) |
core: add preadv, pwritev, pread, pwrite syscall wrappers
add additional system calls plus pick up a couple missed unwrapped
system calls that seem to have slipped into the master branch.
Change-Id: If268ccd5e9a139ac3ffd38293c67cd2f62ea5b58
BUG: 1289258
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/12895
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r-- | xlators/storage/posix/src/posix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index ffae66db273..a3e0aa26bf8 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -2823,7 +2823,7 @@ posix_readv (call_frame_t *frame, xlator_t *this, } _fd = pfd->fd; - op_ret = pread (_fd, iobuf->ptr, size, offset); + op_ret = sys_pread (_fd, iobuf->ptr, size, offset); if (op_ret == -1) { op_errno = errno; gf_msg (this->name, GF_LOG_ERROR, errno, P_MSG_READ_FAILED, @@ -2889,7 +2889,7 @@ __posix_pwritev (int fd, struct iovec *vector, int count, off_t offset) internal_off = offset; for (idx = 0; idx < count; idx++) { - retval = pwrite (fd, vector[idx].iov_base, vector[idx].iov_len, + retval = sys_pwrite (fd, vector[idx].iov_base, vector[idx].iov_len, internal_off); if (retval == -1) { op_ret = -errno; @@ -2935,7 +2935,7 @@ __posix_writev (int fd, struct iovec *vector, int count, off_t startoff, memcpy (buf, vector[idx].iov_base, vector[idx].iov_len); /* not sure whether writev works on O_DIRECT'd fd */ - retval = pwrite (fd, buf, vector[idx].iov_len, internal_off); + retval = sys_pwrite (fd, buf, vector[idx].iov_len, internal_off); if (retval == -1) { op_ret = -errno; goto err; @@ -6105,7 +6105,7 @@ posix_rchecksum (call_frame_t *frame, xlator_t *this, if (priv->aio_capable && priv->aio_init_done) __posix_fd_set_odirect (fd, pfd, 0, offset, len); - bytes_read = pread (_fd, buf, len, offset); + bytes_read = sys_pread (_fd, buf, len, offset); if (bytes_read < 0) { gf_msg (this->name, GF_LOG_WARNING, errno, P_MSG_PREAD_FAILED, |