summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src/libglusterfsclient.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-06-11 04:58:30 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-06-30 14:36:24 -0700
commita11ae3d6766f14af0f797979de689be95987cb4a (patch)
tree0eb97fdb2b265cc2be8bccef808d7f251d644558 /libglusterfsclient/src/libglusterfsclient.h
parent0e1f6449edc3f2e3f72546be527b8f7ad9f65669 (diff)
libglusterfsclient: implement glusterfs_sendfile.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.h')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.h b/libglusterfsclient/src/libglusterfsclient.h
index 9e03a8c59..e8b19f4bc 100755
--- a/libglusterfsclient/src/libglusterfsclient.h
+++ b/libglusterfsclient/src/libglusterfsclient.h
@@ -1234,6 +1234,32 @@ glusterfs_seekdir (glusterfs_dir_t dirfd, off_t offset);
*/
off_t
glusterfs_telldir (glusterfs_dir_t dirfd);
+
+
+/* Write count bytes from in_fd to out_fd, starting at *offset.
+ * glusterfs_sendfile aims at eliminating memory copy at the end of
+ * each read from in_fd, copying the file directly to out_fd from the buffer
+ * provided by glusterfs.
+ *
+ * @out_fd: file descriptor opened for writing
+ *
+ * @in_fd: glusterfs file handle to the file to be read from.
+ *
+ * @offset: If offset is not NULL, then it points to a variable holding the file
+ * offset from which glusterfs_sendfile() will start reading data
+ * from in_fd. When glusterfs_sendfile() returns, this variable will
+ * be set to the offset of the byte following the last byte that was
+ * read. If offset is not NULL, then glusterfs_sendfile() does not
+ * modify the current file offset of in_fd; otherwise the current file
+ * offset is adjusted to reflect the number of bytes read from in_fd.
+ *
+ * @count: number of bytes to copy between the file descriptors.
+ */
+
+ssize_t
+glusterfs_sendfile (int out_fd, glusterfs_file_t in_fd, off_t *offset,
+ size_t count);
+
/* FIXME: review the need for these apis */
/* added for log related initialization in booster fork implementation */
void