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