summaryrefslogtreecommitdiffstats
path: root/booster
diff options
context:
space:
mode:
Diffstat (limited to 'booster')
-rw-r--r--booster/src/booster.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/booster/src/booster.c b/booster/src/booster.c
index ec726178ecc..418c77c4efc 100644
--- a/booster/src/booster.c
+++ b/booster/src/booster.c
@@ -824,29 +824,13 @@ writev (int fd, const struct iovec *vector, int count)
glfs_fd = booster_get_glfs_fd (booster_glfs_fdtable, fd);
if (!glfs_fd) {
- ret = real_writev (fd, vector, count);
- } else {
- uint64_t offset = 0;
- offset = real_lseek64 (fd, 0L, SEEK_CUR);
-
- if (((int64_t) offset) != -1) {
- ret = glusterfs_lseek (glfs_fd, offset, SEEK_SET);
- if (ret != -1) {
- ret = glusterfs_writev (glfs_fd, vector, count);
- }
- } else {
+ if (real_writev == NULL) {
+ errno = ENOSYS;
ret = -1;
- }
-
-/* ret = glusterfs_writev (glfs_fd, vector, count); */
- if (ret == -1) {
+ } else
ret = real_writev (fd, vector, count);
- }
-
- if (ret > 0 && ((int64_t)offset) >= 0) {
- real_lseek64 (fd, offset + ret, SEEK_SET);
- }
-
+ } else {
+ ret = glusterfs_writev (glfs_fd, vector, count);
booster_put_glfs_fd (glfs_fd);
}