[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gluster-devel] [PATCH BUG:393 09/10] libglusterfs: add iov_link
From: |
Corentin Chary |
Subject: |
[Gluster-devel] [PATCH BUG:393 09/10] libglusterfs: add iov_link |
Date: |
Wed, 18 Nov 2009 12:14:01 +0100 |
Signed-off-by: Corentin Chary <address@hidden>
---
libglusterfs/src/common-utils.h | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 084679f..e15cb61 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -184,7 +184,6 @@ iov_dup (struct iovec *vector, int count)
return newvec;
}
-
static inline int
iov_subset (struct iovec *orig, int orig_count,
off_t src_offset, off_t dst_offset,
@@ -256,6 +255,18 @@ iov_load (struct iovec *vector, int count, char *buf)
}
}
+static inline void
+iov_link (struct iovec *vector, int count, char *buf)
+{
+ int i;
+ int copied = 0;
+
+ for (i = 0; i < count; i++) {
+ vector[i].iov_base = buf + copied;
+ copied += vector[i].iov_len;
+ }
+}
+
static inline int
mem_0filled (const char *buf, size_t size)
{
--
1.6.4.4
- [Gluster-devel] [PATCH BUG:393 00/10] Add transport encryption translators, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 01/10] transport/encryption: add infrastructure, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 02/10] transport/encryption: add directory and base Makefile.am, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 03/10] transport/encryption: add rot-13 demo, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 04/10] transport/encryption: keep xlator reference, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 05/10] transport/encryption: pass transport_crypto_t instead of transport_t, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 06/10] libglusterfs: add iov_load function, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 07/10] transport/encryption: add NaCl encryptor, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 08/10] transport/ib-verbs: add missing buflen_p parameter, Corentin Chary, 2009/11/18
- [Gluster-devel] [PATCH BUG:393 09/10] libglusterfs: add iov_link,
Corentin Chary <=
- [Gluster-devel] [PATCH BUG:393 10/10] transport/encryption: fix encryption when used with afr, Corentin Chary, 2009/11/18