From 0c07ee0a5141f1ea763dea09fcd9fcf240ce13ca Mon Sep 17 00:00:00 2001
From: Atin Mukherjee <amukherj@redhat.com>
Date: Tue, 20 Sep 2016 03:09:08 +0530
Subject: [PATCH 85/86] syscall: remove preadv and pwritev sys wrappers
Commit 76f1680 introduced sys wrappers for preadv and pwritev where these
syscalls are not supported for RHEL5. These functions are of actually no use
w.r.t downstream code as sys_pwritev is used only in bd xlator which is not
supported in downstream
Label: DOWNSTREAM ONLY
Change-Id: Ifdc798f1fa74affd77abb06dd14cf9b51f484fe7
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
---
libglusterfs/src/syscall.c | 14 --------------
libglusterfs/src/syscall.h | 6 ------
xlators/storage/bd/src/bd.c | 4 ++--
3 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c
index 316d804..51b4538 100644
--- a/libglusterfs/src/syscall.c
+++ b/libglusterfs/src/syscall.c
@@ -272,20 +272,6 @@ sys_write (int fd, const void *buf, size_t count)
ssize_t
-sys_preadv (int fd, const struct iovec *iov, int iovcnt, off_t offset)
-{
- return preadv (fd, iov, iovcnt, offset);
-}
-
-
-ssize_t
-sys_pwritev (int fd, const struct iovec *iov, int iovcnt, off_t offset)
-{
- return pwritev (fd, iov, iovcnt, offset);
-}
-
-
-ssize_t
sys_pread (int fd, void *buf, size_t count, off_t offset)
{
return pread (fd, buf, count, offset);
diff --git a/libglusterfs/src/syscall.h b/libglusterfs/src/syscall.h
index b549f6a..3fd2b63 100644
--- a/libglusterfs/src/syscall.h
+++ b/libglusterfs/src/syscall.h
@@ -197,12 +197,6 @@ int
sys_fallocate(int fd, int mode, off_t offset, off_t len);
ssize_t
-sys_preadv (int fd, const struct iovec *iov, int iovcnt, off_t offset);
-
-ssize_t
-sys_pwritev (int fd, const struct iovec *iov, int iovcnt, off_t offset);
-
-ssize_t
sys_pread(int fd, void *buf, size_t count, off_t offset);
ssize_t
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index 6c1d2a2..0a4d6ba 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -1787,7 +1787,7 @@ __bd_pwritev (int fd, struct iovec *vector, int count, off_t offset,
if (!vector)
return -EFAULT;
- retval = sys_pwritev (fd, vector, count, offset);
+ retval = pwritev (fd, vector, count, offset);
if (retval == -1) {
int64_t off = offset;
gf_log (THIS->name, GF_LOG_WARNING,
@@ -1810,7 +1810,7 @@ __bd_pwritev (int fd, struct iovec *vector, int count, off_t offset,
vector[index].iov_len = bd_size - internal_offset;
no_space = 1;
}
- retval = sys_pwritev (fd, vector[index].iov_base,
+ retval = pwritev (fd, vector[index].iov_base,
vector[index].iov_len, internal_offset);
if (retval == -1) {
gf_log (THIS->name, GF_LOG_WARNING,
--
1.7.1