summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/src/gfapi-messages.h2
-rw-r--r--api/src/glfs-fops.c10
-rw-r--r--api/src/glfs-handleops.c2
-rw-r--r--api/src/glfs-handles.h174
-rw-r--r--api/src/glfs-internal.h2
-rw-r--r--api/src/glfs-master.c2
-rw-r--r--api/src/glfs-mem-types.h2
-rw-r--r--api/src/glfs-mgmt.c2
-rw-r--r--api/src/glfs-resolve.c2
-rw-r--r--api/src/glfs.c2
-rw-r--r--api/src/glfs.h438
11 files changed, 377 insertions, 261 deletions
diff --git a/api/src/gfapi-messages.h b/api/src/gfapi-messages.h
index 4d9dff7196d..15f9945c5ed 100644
--- a/api/src/gfapi-messages.h
+++ b/api/src/gfapi-messages.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com>
+ * Copyright (c) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
* This file is part of GlusterFS.
*
* This file is licensed to you under your choice of the GNU Lesser
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
index e9eae04a0ac..8642da16406 100644
--- a/api/src/glfs-fops.c
+++ b/api/src/glfs-fops.c
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2012-2018 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
@@ -1013,7 +1013,7 @@ glfs_preadv_async_common (struct glfs_fd *glfd, const struct iovec *iovec,
int ret = 0;
call_frame_t *frame = NULL;
xlator_t *subvol = NULL;
- glfs_t *fs = NULL;
+ struct glfs *fs = NULL;
fd_t *fd = NULL;
dict_t *fop_attr = NULL;
@@ -4868,7 +4868,7 @@ invalid_fs:
int
pub_glfs_file_lock (struct glfs_fd *glfd, int cmd, struct flock *flock,
- enum glfs_lock_mode_t lk_mode)
+ glfs_lock_mode_t lk_mode)
{
int ret = -1;
dict_t *xdata_in = NULL;
@@ -4914,7 +4914,7 @@ pub_glfs_posix_lock (struct glfs_fd *glfd, int cmd, struct flock *flock)
GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_posix_lock, 3.4.0);
int
-pub_glfs_fd_set_lkowner (glfs_fd_t *glfd, void *data, int len)
+pub_glfs_fd_set_lkowner (struct glfs_fd *glfd, void *data, int len)
{
int ret = -1;
@@ -4956,7 +4956,7 @@ pub_glfs_dup (struct glfs_fd *glfd)
{
xlator_t *subvol = NULL;
fd_t *fd = NULL;
- glfs_fd_t *dupfd = NULL;
+ struct glfs_fd *dupfd = NULL;
struct glfs *fs = NULL;
DECLARE_OLD_THIS;
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index cb37de30e4a..97f5cdc8fed 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com>
+ * Copyright (c) 2013-2018 Red Hat, Inc. <http://www.redhat.com>
* This file is part of GlusterFS.
*
* This file is licensed to you under your choice of the GNU Lesser
diff --git a/api/src/glfs-handles.h b/api/src/glfs-handles.h
index 42f46b0aaac..a5c6ff37043 100644
--- a/api/src/glfs-handles.h
+++ b/api/src/glfs-handles.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2013-2018 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
@@ -111,151 +111,159 @@ typedef struct glfs_object glfs_object_t;
* to glfs_free().
*/
struct glfs_upcall_inode;
+typedef struct glfs_upcall_inode glfs_upcall_inode_t;
-struct glfs_object*
-glfs_upcall_inode_get_object (struct glfs_upcall_inode *arg) __THROW
+glfs_object_t*
+glfs_upcall_inode_get_object (glfs_upcall_inode_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_inode_get_object, 3.7.16);
uint64_t
-glfs_upcall_inode_get_flags (struct glfs_upcall_inode *arg) __THROW
+glfs_upcall_inode_get_flags (glfs_upcall_inode_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_inode_get_flags, 3.7.16);
struct stat*
-glfs_upcall_inode_get_stat (struct glfs_upcall_inode *arg) __THROW
+glfs_upcall_inode_get_stat (glfs_upcall_inode_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_inode_get_stat, 3.7.16);
uint64_t
-glfs_upcall_inode_get_expire (struct glfs_upcall_inode *arg) __THROW
+glfs_upcall_inode_get_expire (glfs_upcall_inode_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_inode_get_expire, 3.7.16);
-struct glfs_object*
-glfs_upcall_inode_get_pobject (struct glfs_upcall_inode *arg) __THROW
+glfs_object_t*
+glfs_upcall_inode_get_pobject (glfs_upcall_inode_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_inode_get_pobject, 3.7.16);
struct stat*
-glfs_upcall_inode_get_pstat (struct glfs_upcall_inode *arg) __THROW
+glfs_upcall_inode_get_pstat (glfs_upcall_inode_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_inode_get_pstat, 3.7.16);
-struct glfs_object*
-glfs_upcall_inode_get_oldpobject (struct glfs_upcall_inode *arg) __THROW
+glfs_object_t*
+glfs_upcall_inode_get_oldpobject (glfs_upcall_inode_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_inode_get_oldpobject, 3.7.16);
struct stat*
-glfs_upcall_inode_get_oldpstat (struct glfs_upcall_inode *arg) __THROW
+glfs_upcall_inode_get_oldpstat (glfs_upcall_inode_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_inode_get_oldpstat, 3.7.16);
/* Handle based operations */
/* Operations that generate handles */
-struct glfs_object *glfs_h_lookupat (struct glfs *fs,
- struct glfs_object *parent,
- const char *path,
- struct stat *stat, int follow) __THROW
+glfs_object_t*
+glfs_h_lookupat (glfs_t *fs, glfs_object_t *parent, const char *path,
+ struct stat *stat, int follow) __THROW
GFAPI_PUBLIC(glfs_h_lookupat, 3.7.4);
-struct glfs_object *glfs_h_creat (struct glfs *fs, struct glfs_object *parent,
- const char *path, int flags, mode_t mode,
- struct stat *sb) __THROW
+glfs_object_t*
+glfs_h_creat (glfs_t *fs, glfs_object_t *parent, const char *path,
+ int flags, mode_t mode, struct stat *sb) __THROW
GFAPI_PUBLIC(glfs_h_creat, 3.4.2);
-struct glfs_object *glfs_h_mkdir (struct glfs *fs, struct glfs_object *parent,
- const char *path, mode_t flags,
- struct stat *sb) __THROW
+glfs_object_t*
+glfs_h_mkdir (glfs_t *fs, glfs_object_t *parent, const char *path,
+ mode_t flags, struct stat *sb) __THROW
GFAPI_PUBLIC(glfs_h_mkdir, 3.4.2);
-struct glfs_object *glfs_h_mknod (struct glfs *fs, struct glfs_object *parent,
- const char *path, mode_t mode, dev_t dev,
- struct stat *sb) __THROW
+glfs_object_t*
+glfs_h_mknod (glfs_t *fs, glfs_object_t *parent, const char *path,
+ mode_t mode, dev_t dev, struct stat *sb) __THROW
GFAPI_PUBLIC(glfs_h_mknod, 3.4.2);
-struct glfs_object *glfs_h_symlink (struct glfs *fs, struct glfs_object *parent,
- const char *name, const char *data,
- struct stat *stat) __THROW
+glfs_object_t*
+glfs_h_symlink (glfs_t *fs, glfs_object_t *parent, const char *name,
+ const char *data, struct stat *stat) __THROW
GFAPI_PUBLIC(glfs_h_symlink, 3.4.2);
/* Operations on the actual objects */
-int glfs_h_unlink (struct glfs *fs, struct glfs_object *parent,
- const char *path) __THROW
+int
+glfs_h_unlink (glfs_t *fs, glfs_object_t *parent, const char *path) __THROW
GFAPI_PUBLIC(glfs_h_unlink, 3.4.2);
-int glfs_h_close (struct glfs_object *object) __THROW
+int
+glfs_h_close (glfs_object_t *object) __THROW
GFAPI_PUBLIC(glfs_h_close, 3.4.2);
-int glfs_caller_specific_init (void *uid_caller_key, void *gid_caller_key,
- void *future) __THROW
+int
+glfs_caller_specific_init (void *uid_caller_key, void *gid_caller_key,
+ void *future) __THROW
GFAPI_PUBLIC(glfs_caller_specific_init, 3.5.0);
-int glfs_h_truncate (struct glfs *fs, struct glfs_object *object,
- off_t offset) __THROW
+int
+glfs_h_truncate (glfs_t *fs, glfs_object_t *object,
+ off_t offset) __THROW
GFAPI_PUBLIC(glfs_h_truncate, 3.4.2);
-int glfs_h_stat(struct glfs *fs, struct glfs_object *object,
- struct stat *stat) __THROW
+int
+glfs_h_stat(glfs_t *fs, glfs_object_t *object, struct stat *stat) __THROW
GFAPI_PUBLIC(glfs_h_stat, 3.4.2);
-int glfs_h_statfs(struct glfs *fs, struct glfs_object *object,
- struct statvfs *stat) __THROW
+int
+glfs_h_statfs(glfs_t *fs, glfs_object_t *object, struct statvfs *stat) __THROW
GFAPI_PUBLIC(glfs_h_statfs, 3.7.0);
-int glfs_h_getattrs (struct glfs *fs, struct glfs_object *object,
- struct stat *stat) __THROW
+int
+glfs_h_getattrs (glfs_t *fs, glfs_object_t *object, struct stat *stat) __THROW
GFAPI_PUBLIC(glfs_h_getattrs, 3.4.2);
-int glfs_h_getxattrs (struct glfs *fs, struct glfs_object *object,
- const char *name, void *value,
- size_t size) __THROW
+int
+glfs_h_getxattrs (glfs_t *fs, glfs_object_t *object, const char *name,
+ void *value, size_t size) __THROW
GFAPI_PUBLIC(glfs_h_getxattrs, 3.5.1);
-int glfs_h_setattrs (struct glfs *fs, struct glfs_object *object,
- struct stat *sb, int valid) __THROW
+int
+glfs_h_setattrs (glfs_t *fs, glfs_object_t *object, struct stat *sb,
+ int valid) __THROW
GFAPI_PUBLIC(glfs_h_setattrs, 3.4.2);
-int glfs_h_setxattrs (struct glfs *fs, struct glfs_object *object,
- const char *name, const void *value,
- size_t size, int flags) __THROW
+int
+glfs_h_setxattrs (glfs_t *fs, glfs_object_t *object, const char *name,
+ const void *value, size_t size, int flags) __THROW
GFAPI_PUBLIC(glfs_h_setxattrs, 3.5.0);
-int glfs_h_readlink (struct glfs *fs, struct glfs_object *object, char *buf,
- size_t bufsiz) __THROW
+int
+glfs_h_readlink (glfs_t *fs, glfs_object_t *object, char *buf,
+ size_t bufsiz) __THROW
GFAPI_PUBLIC(glfs_h_readlink, 3.4.2);
-int glfs_h_link (struct glfs *fs, struct glfs_object *linktgt,
- struct glfs_object *parent, const char *name) __THROW
+int
+glfs_h_link (glfs_t *fs, glfs_object_t *linktgt, glfs_object_t *parent,
+ const char *name) __THROW
GFAPI_PUBLIC(glfs_h_link, 3.4.2);
-int glfs_h_rename (struct glfs *fs, struct glfs_object *olddir,
- const char *oldname, struct glfs_object *newdir,
- const char *newname) __THROW
+int
+glfs_h_rename (glfs_t *fs, glfs_object_t *olddir, const char *oldname,
+ glfs_object_t *newdir, const char *newname) __THROW
GFAPI_PUBLIC(glfs_h_rename, 3.4.2);
-int glfs_h_removexattrs (struct glfs *fs, struct glfs_object *object,
- const char *name) __THROW
+int
+glfs_h_removexattrs (glfs_t *fs, glfs_object_t *object,
+ const char *name) __THROW
GFAPI_PUBLIC(glfs_h_removexattrs, 3.5.1);
/* Operations enabling opaque invariant handle to object transitions */
-ssize_t glfs_h_extract_handle (struct glfs_object *object,
- unsigned char *handle, int len) __THROW
+ssize_t
+glfs_h_extract_handle (glfs_object_t *object, unsigned char *handle,
+ int len) __THROW
GFAPI_PUBLIC(glfs_h_extract_handle, 3.4.2);
/* Given a handle, looks up the inode and creates glfs_object.
* In addition, if provided 'stat', copies the inode attributes
*/
-struct glfs_object *glfs_h_create_from_handle (struct glfs *fs,
- unsigned char *handle, int len,
- struct stat *stat) __THROW
+glfs_object_t*
+glfs_h_create_from_handle (glfs_t *fs, unsigned char *handle, int len,
+ struct stat *stat) __THROW
GFAPI_PUBLIC(glfs_h_create_from_handle, 3.4.2);
/* Operations enabling object handles to fd transitions */
-struct glfs_fd *glfs_h_opendir (struct glfs *fs,
- struct glfs_object *object) __THROW
+glfs_fd_t*
+glfs_h_opendir (glfs_t *fs, glfs_object_t *object) __THROW
GFAPI_PUBLIC(glfs_h_opendir, 3.4.2);
-struct glfs_fd *glfs_h_open (struct glfs *fs, struct glfs_object *object,
- int flags) __THROW
+glfs_fd_t*
+glfs_h_open (glfs_t *fs, glfs_object_t *object, int flags) __THROW
GFAPI_PUBLIC(glfs_h_open, 3.4.2);
int
-glfs_h_access (struct glfs *fs, struct glfs_object *object, int mask) __THROW
+glfs_h_access (glfs_t *fs, glfs_object_t *object, int mask) __THROW
GFAPI_PUBLIC(glfs_h_access, 3.6.0);
/*
@@ -289,27 +297,27 @@ glfs_h_access (struct glfs *fs, struct glfs_object *object, int mask) __THROW
*/
int
-glfs_h_poll_upcall (struct glfs *fs, struct glfs_upcall **cbk) __THROW
+glfs_h_poll_upcall (glfs_t *fs, glfs_upcall_t **cbk) __THROW
GFAPI_PUBLIC(glfs_h_poll_upcall, 3.7.16);
int
-glfs_h_acl_set (struct glfs *fs, struct glfs_object *object,
- const acl_type_t type, const acl_t acl) __THROW
+glfs_h_acl_set (glfs_t *fs, glfs_object_t *object, const acl_type_t type,
+ const acl_t acl) __THROW
GFAPI_PUBLIC(glfs_h_acl_set, 3.7.0);
acl_t
-glfs_h_acl_get (struct glfs *fs, struct glfs_object *object,
+glfs_h_acl_get (glfs_t *fs, glfs_object_t *object,
const acl_type_t type) __THROW
GFAPI_PUBLIC(glfs_h_acl_get, 3.7.0);
size_t
-glfs_h_anonymous_write (struct glfs *fs, struct glfs_object *object,
- const void *buf, size_t count, off_t offset) __THROW
+glfs_h_anonymous_write (glfs_t *fs, glfs_object_t *object, const void *buf,
+ size_t count, off_t offset) __THROW
GFAPI_PUBLIC(glfs_h_anonymous_write, 3.7.0);
ssize_t
-glfs_h_anonymous_read (struct glfs *fs, struct glfs_object *object,
- const void *buf, size_t count, off_t offset) __THROW
+glfs_h_anonymous_read (glfs_t *fs, glfs_object_t *object,
+ const void *buf, size_t count, off_t offset) __THROW
GFAPI_PUBLIC(glfs_h_anonymous_read, 3.7.0);
/*
@@ -317,23 +325,23 @@ glfs_h_anonymous_read (struct glfs *fs, struct glfs_object *object,
* of 'glfs_free(xstat)'. Make sure to have a copy using 'glfs_object_copy()'
* to use post that.
*/
-struct glfs_object*
+glfs_object_t*
glfs_xreaddirplus_get_object (struct glfs_xreaddirp_stat *xstat) __THROW
GFAPI_PUBLIC(glfs_xreaddirplus_get_object, 3.11.0);
/* Applications should close the object returned by this routine
* explicitly using 'glfs_h_close()'
*/
-struct glfs_object*
-glfs_object_copy (struct glfs_object *src) __THROW
+glfs_object_t*
+glfs_object_copy (glfs_object_t *src) __THROW
GFAPI_PUBLIC(glfs_object_copy, 3.11.0);
-int glfs_h_lease (struct glfs *fs, struct glfs_object *object,
- struct glfs_lease *lease) __THROW
+int
+glfs_h_lease (glfs_t *fs, glfs_object_t *object, glfs_lease_t *lease) __THROW
GFAPI_PUBLIC(glfs_h_lease, 4.0.0);
-struct glfs_object *
-glfs_h_find_handle (struct glfs *fs, unsigned char *handle,
+glfs_object_t*
+glfs_h_find_handle (glfs_t *fs, unsigned char *handle,
int len) __THROW
GFAPI_PUBLIC(glfs_h_lease, 4.0.0);
__END_DECLS
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
index 10bda62dd5c..4416b78650f 100644
--- a/api/src/glfs-internal.h
+++ b/api/src/glfs-internal.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2012-2018 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
diff --git a/api/src/glfs-master.c b/api/src/glfs-master.c
index 00a9c929a04..9648bbbc03a 100644
--- a/api/src/glfs-master.c
+++ b/api/src/glfs-master.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2012-2016 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
diff --git a/api/src/glfs-mem-types.h b/api/src/glfs-mem-types.h
index 4179138e65e..7bfa8c98c0f 100644
--- a/api/src/glfs-mem-types.h
+++ b/api/src/glfs-mem-types.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2012-2017 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
index e6c84fd4b13..26b8538e381 100644
--- a/api/src/glfs-mgmt.c
+++ b/api/src/glfs-mgmt.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2012-2018 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index d305c126cb6..5c500480239 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2012-2018 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
diff --git a/api/src/glfs.c b/api/src/glfs.c
index cc84842f286..545015fd58c 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2012-2018 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
diff --git a/api/src/glfs.h b/api/src/glfs.h
index eac150512fa..b0f6605253a 100644
--- a/api/src/glfs.h
+++ b/api/src/glfs.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ Copyright (c) 2012-2018 Red Hat, Inc. <http://www.redhat.com>
This file is part of GlusterFS.
This file is licensed to you under your choice of the GNU Lesser
@@ -93,8 +93,8 @@ typedef struct glfs glfs_t;
@volname: Name of the volume. This identifies the server-side volume and
the fetched volfile (equivalent of --volfile-id command line
- parameter to glusterfsd). When used with glfs_set_volfile() the
- @volname has no effect (except for appearing in log messages).
+ parameter to glusterfsd). When used with glfs_set_volfile() the
+ @volname has no effect (except for appearing in log messages).
RETURN VALUES
@@ -187,11 +187,14 @@ int glfs_set_volfile (glfs_t *fs, const char *volfile) __THROW
*/
-int glfs_set_volfile_server (glfs_t *fs, const char *transport,
- const char *host, int port) __THROW
+int
+glfs_set_volfile_server (glfs_t *fs, const char *transport,
+ const char *host, int port) __THROW
GFAPI_PUBLIC(glfs_set_volfile_server, 3.4.0);
-int glfs_unset_volfile_server (glfs_t *fs, const char *transport,
- const char *host, int port) __THROW
+
+int
+glfs_unset_volfile_server (glfs_t *fs, const char *transport,
+ const char *host, int port) __THROW
GFAPI_PUBLIC(glfs_unset_volfile_server, 3.5.1);
/*
SYNOPSIS
@@ -222,10 +225,10 @@ int glfs_unset_volfile_server (glfs_t *fs, const char *transport,
*/
-int glfs_set_logging (glfs_t *fs, const char *logfile, int loglevel) __THROW
+int
+glfs_set_logging (glfs_t *fs, const char *logfile, int loglevel) __THROW
GFAPI_PUBLIC(glfs_set_logging, 3.4.0);
-
/*
SYNOPSIS
@@ -250,7 +253,8 @@ int glfs_set_logging (glfs_t *fs, const char *logfile, int loglevel) __THROW
*/
-int glfs_init (glfs_t *fs) __THROW
+int
+glfs_init (glfs_t *fs) __THROW
GFAPI_PUBLIC(glfs_init, 3.4.0);
@@ -284,7 +288,8 @@ int glfs_init (glfs_t *fs) __THROW
0 : Success.
*/
-int glfs_fini (glfs_t *fs) __THROW
+int
+glfs_fini (glfs_t *fs) __THROW
GFAPI_PUBLIC(glfs_fini, 3.4.0);
/*
@@ -315,7 +320,8 @@ int glfs_fini (glfs_t *fs) __THROW
<0: volfile length exceeds @len by N bytes (@buf unchanged)
*/
-ssize_t glfs_get_volfile (glfs_t *fs, void *buf, size_t len) __THROW
+ssize_t
+glfs_get_volfile (glfs_t *fs, void *buf, size_t len) __THROW
GFAPI_PUBLIC(glfs_get_volfile, 3.6.0);
@@ -347,7 +353,8 @@ ssize_t glfs_get_volfile (glfs_t *fs, void *buf, size_t len) __THROW
Others : length of the volume UUID stored.
*/
-int glfs_get_volumeid (struct glfs *fs, char *volid, size_t size) __THROW
+int
+glfs_get_volumeid (glfs_t *fs, char *volid, size_t size) __THROW
GFAPI_PUBLIC(glfs_get_volumeid, 3.5.0);
@@ -398,13 +405,20 @@ typedef char glfs_leaseid_t[GLFS_LEASE_ID_SIZE];
* reverted to global process defaults as required.
*
*/
-int glfs_setfsuid (uid_t fsuid) __THROW
+int
+glfs_setfsuid (uid_t fsuid) __THROW
GFAPI_PUBLIC(glfs_setfsuid, 3.4.2);
-int glfs_setfsgid (gid_t fsgid) __THROW
+
+int
+glfs_setfsgid (gid_t fsgid) __THROW
GFAPI_PUBLIC(glfs_setfsgid, 3.4.2);
-int glfs_setfsgroups (size_t size, const gid_t *list) __THROW
+
+int
+glfs_setfsgroups (size_t size, const gid_t *list) __THROW
GFAPI_PUBLIC(glfs_setfsgroups, 3.4.2);
-int glfs_setfsleaseid (glfs_leaseid_t leaseid) __THROW
+
+int
+glfs_setfsleaseid (glfs_leaseid_t leaseid) __THROW
GFAPI_PUBLIC(glfs_setfsleaseid, 4.0.0);
/*
@@ -432,10 +446,10 @@ int glfs_setfsleaseid (glfs_leaseid_t leaseid) __THROW
*/
-glfs_fd_t *glfs_open (glfs_t *fs, const char *path, int flags) __THROW
+glfs_fd_t*
+glfs_open (glfs_t *fs, const char *path, int flags) __THROW
GFAPI_PUBLIC(glfs_open, 3.4.0);
-
/*
SYNOPSIS
@@ -462,18 +476,21 @@ glfs_fd_t *glfs_open (glfs_t *fs, const char *path, int flags) __THROW
*/
-glfs_fd_t *glfs_creat (glfs_t *fs, const char *path, int flags,
- mode_t mode) __THROW
+glfs_fd_t*
+glfs_creat (glfs_t *fs, const char *path, int flags, mode_t mode) __THROW
GFAPI_PUBLIC(glfs_creat, 3.4.0);
-int glfs_close (glfs_fd_t *fd) __THROW
+int
+glfs_close (glfs_fd_t *fd) __THROW
GFAPI_PUBLIC(glfs_close, 3.4.0);
-glfs_t *glfs_from_glfd (glfs_fd_t *fd) __THROW
+glfs_t*
+glfs_from_glfd (glfs_fd_t *fd) __THROW
GFAPI_PUBLIC(glfs_from_glfd, 3.4.0);
-int glfs_set_xlator_option (glfs_t *fs, const char *xlator, const char *key,
- const char *value) __THROW
+int
+glfs_set_xlator_option (glfs_t *fs, const char *xlator, const char *key,
+ const char *value) __THROW
GFAPI_PUBLIC(glfs_set_xlator_option, 3.4.0);
/*
@@ -504,129 +521,175 @@ typedef void (*glfs_io_cbk) (glfs_fd_t *fd, ssize_t ret, struct stat *prestat,
// glfs_{read,write}[_async]
-ssize_t glfs_read (glfs_fd_t *fd, void *buf,
- size_t count, int flags) __THROW
+ssize_t
+glfs_read (glfs_fd_t *fd, void *buf, size_t count, int flags) __THROW
GFAPI_PUBLIC(glfs_read, 3.4.0);
-ssize_t glfs_write (glfs_fd_t *fd, const void *buf,
- size_t count, int flags) __THROW
+
+ssize_t
+glfs_write (glfs_fd_t *fd, const void *buf, size_t count, int flags) __THROW
GFAPI_PUBLIC(glfs_write, 3.4.0);
-int glfs_read_async (glfs_fd_t *fd, void *buf, size_t count, int flags,
- glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_read_async (glfs_fd_t *fd, void *buf, size_t count, int flags,
+ glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_read_async, future);
-int glfs_write_async (glfs_fd_t *fd, const void *buf, size_t count, int flags,
- glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_write_async (glfs_fd_t *fd, const void *buf, size_t count, int flags,
+ glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_write_async, future);
// glfs_{read,write}v[_async]
-ssize_t glfs_readv (glfs_fd_t *fd, const struct iovec *iov, int iovcnt,
- int flags) __THROW
+ssize_t
+glfs_readv (glfs_fd_t *fd, const struct iovec *iov, int iovcnt,
+ int flags) __THROW
GFAPI_PUBLIC(glfs_readv, 3.4.0);
-ssize_t glfs_writev (glfs_fd_t *fd, const struct iovec *iov, int iovcnt,
- int flags) __THROW
+
+ssize_t
+glfs_writev (glfs_fd_t *fd, const struct iovec *iov, int iovcnt,
+ int flags) __THROW
GFAPI_PUBLIC(glfs_writev, 3.4.0);
-int glfs_readv_async (glfs_fd_t *fd, const struct iovec *iov, int count,
- int flags, glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_readv_async (glfs_fd_t *fd, const struct iovec *iov, int count,
+ int flags, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_readv_async, future);
-int glfs_writev_async (glfs_fd_t *fd, const struct iovec *iov, int count,
- int flags, glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_writev_async (glfs_fd_t *fd, const struct iovec *iov, int count,
+ int flags, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_writev_async, future);
// glfs_p{read,write}[_async]
-ssize_t glfs_pread (glfs_fd_t *fd, void *buf, size_t count, off_t offset,
- int flags, struct stat *poststat) __THROW
+ssize_t
+glfs_pread (glfs_fd_t *fd, void *buf, size_t count, off_t offset, int flags,
+ struct stat *poststat) __THROW
GFAPI_PUBLIC(glfs_pread, future);
-ssize_t glfs_pwrite (glfs_fd_t *fd, const void *buf, size_t count,
- off_t offset, int flags, struct stat *prestat,
- struct stat *poststat) __THROW
+
+ssize_t
+glfs_pwrite (glfs_fd_t *fd, const void *buf, size_t count, off_t offset,
+ int flags, struct stat *prestat, struct stat *poststat) __THROW
GFAPI_PUBLIC(glfs_pwrite, future);
-int glfs_pread_async (glfs_fd_t *fd, void *buf, size_t count, off_t offset,
- int flags, glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_pread_async (glfs_fd_t *fd, void *buf, size_t count, off_t offset,
+ int flags, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_pread_async, future);
-int glfs_pwrite_async (glfs_fd_t *fd, const void *buf, int count, off_t offset,
- int flags, glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_pwrite_async (glfs_fd_t *fd, const void *buf, int count, off_t offset,
+ int flags, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_pwrite_async, future);
// glfs_p{read,write}v[_async]
-ssize_t glfs_preadv (glfs_fd_t *fd, const struct iovec *iov, int iovcnt,
- off_t offset, int flags) __THROW
+ssize_t
+glfs_preadv (glfs_fd_t *fd, const struct iovec *iov, int iovcnt,
+ off_t offset, int flags) __THROW
GFAPI_PUBLIC(glfs_preadv, 3.4.0);
-ssize_t glfs_pwritev (glfs_fd_t *fd, const struct iovec *iov, int iovcnt,
- off_t offset, int flags) __THROW
+
+ssize_t
+glfs_pwritev (glfs_fd_t *fd, const struct iovec *iov, int iovcnt,
+ off_t offset, int flags) __THROW
GFAPI_PUBLIC(glfs_pwritev, 3.4.0);
-int glfs_preadv_async (glfs_fd_t *fd, const struct iovec *iov,
- int count, off_t offset, int flags,
- glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_preadv_async (glfs_fd_t *fd, const struct iovec *iov, int count,
+ off_t offset, int flags, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_preadv_async, future);
-int glfs_pwritev_async (glfs_fd_t *fd, const struct iovec *iov,
- int count, off_t offset, int flags,
- glfs_io_cbk fn, void *data) __THROW
- GFAPI_PUBLIC(glfs_pwritev_async, future);
+int
+glfs_pwritev_async (glfs_fd_t *fd, const struct iovec *iov, int count,
+ off_t offset, int flags, glfs_io_cbk fn, void *data) __THROW
+ GFAPI_PUBLIC(glfs_pwritev_async, future);
-off_t glfs_lseek (glfs_fd_t *fd, off_t offset, int whence) __THROW
+off_t
+glfs_lseek (glfs_fd_t *fd, off_t offset, int whence) __THROW
GFAPI_PUBLIC(glfs_lseek, 3.4.0);
-int glfs_truncate (glfs_t *fs, const char *path, off_t length) __THROW
+int
+glfs_truncate (glfs_t *fs, const char *path, off_t length) __THROW
GFAPI_PUBLIC(glfs_truncate, 3.7.15);
-int glfs_ftruncate (glfs_fd_t *fd, off_t length, struct stat *prestat,
- struct stat *poststat) __THROW
+int
+glfs_ftruncate (glfs_fd_t *fd, off_t length, struct stat *prestat,
+ struct stat *poststat) __THROW
GFAPI_PUBLIC(glfs_ftruncate, future);
-int glfs_ftruncate_async (glfs_fd_t *fd, off_t length, glfs_io_cbk fn,
- void *data) __THROW
+
+int
+glfs_ftruncate_async (glfs_fd_t *fd, off_t length, glfs_io_cbk fn,
+ void *data) __THROW
GFAPI_PUBLIC(glfs_ftruncate_async, future);
-int glfs_lstat (glfs_t *fs, const char *path, struct stat *buf) __THROW
+int
+glfs_lstat (glfs_t *fs, const char *path, struct stat *buf) __THROW
GFAPI_PUBLIC(glfs_lstat, 3.4.0);
-int glfs_stat (glfs_t *fs, const char *path, struct stat *buf) __THROW
+
+int
+glfs_stat (glfs_t *fs, const char *path, struct stat *buf) __THROW
GFAPI_PUBLIC(glfs_stat, 3.4.0);
-int glfs_fstat (glfs_fd_t *fd, struct stat *buf) __THROW
+
+int
+glfs_fstat (glfs_fd_t *fd, struct stat *buf) __THROW
GFAPI_PUBLIC(glfs_fstat, 3.4.0);
-int glfs_fsync (glfs_fd_t *fd, struct stat *prestat,
- struct stat *poststat) __THROW
+int
+glfs_fsync (glfs_fd_t *fd, struct stat *prestat, struct stat *poststat) __THROW
GFAPI_PUBLIC(glfs_fsync, future);
-int glfs_fsync_async (glfs_fd_t *fd, glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_fsync_async (glfs_fd_t *fd, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_fsync_async, future);
-int glfs_fdatasync (glfs_fd_t *fd, struct stat *prestat,
- struct stat *poststat) __THROW
+int
+glfs_fdatasync (glfs_fd_t *fd, struct stat *prestat,
+ struct stat *poststat) __THROW
GFAPI_PUBLIC(glfs_fdatasync, future);
-int glfs_fdatasync_async (glfs_fd_t *fd, glfs_io_cbk fn, void *data) __THROW
+
+int
+glfs_fdatasync_async (glfs_fd_t *fd, glfs_io_cbk fn, void *data) __THROW
GFAPI_PUBLIC(glfs_fdatasync_async, future);
-int glfs_access (glfs_t *fs, const char *path, int mode) __THROW
+int
+glfs_access (glfs_t *fs, const char *path, int mode) __THROW
GFAPI_PUBLIC(glfs_access, 3.4.0);
-int glfs_symlink (glfs_t *fs, const char *oldpath, const char *newpath) __THROW
+int
+glfs_symlink (glfs_t *fs, const char *oldpath, const char *newpath) __THROW
GFAPI_PUBLIC(glfs_symlink, 3.4.0);
-int glfs_readlink (glfs_t *fs, const char *path,
- char *buf, size_t bufsiz) __THROW
+int
+glfs_readlink (glfs_t *fs, const char *path, char *buf, size_t bufsiz) __THROW
GFAPI_PUBLIC(glfs_readlink, 3.4.0);
-int glfs_mknod (glfs_t *fs, const char *path, mode_t mode, dev_t dev) __THROW
+int
+glfs_mknod (glfs_t *fs, const char *path, mode_t mode, dev_t dev) __THROW
GFAPI_PUBLIC(glfs_mknod, 3.4.0);
-int glfs_mkdir (glfs_t *fs, const char *path, mode_t mode) __THROW
+int
+glfs_mkdir (glfs_t *fs, const char *path, mode_t mode) __THROW
GFAPI_PUBLIC(glfs_mkdir, 3.4.0);
-int glfs_unlink (glfs_t *fs, const char *path) __THROW
+int
+glfs_unlink (glfs_t *fs, const char *path) __THROW
GFAPI_PUBLIC(glfs_unlink, 3.4.0);
-int glfs_rmdir (glfs_t *fs, const char *path) __THROW
+int
+glfs_rmdir (glfs_t *fs, const char *path) __THROW
GFAPI_PUBLIC(glfs_rmdir, 3.4.0);
-int glfs_rename (glfs_t *fs, const char *oldpath, const char *newpath) __THROW
+int
+glfs_rename (glfs_t *fs, const char *oldpath, const char *newpath) __THROW
GFAPI_PUBLIC(glfs_rename, 3.4.0);
-int glfs_link (glfs_t *fs, const char *oldpath, const char *newpath) __THROW
+int
+glfs_link (glfs_t *fs, const char *oldpath, const char *newpath) __THROW
GFAPI_PUBLIC(glfs_link, 3.4.0);
-glfs_fd_t *glfs_opendir (glfs_t *fs, const char *path) __THROW
+glfs_fd_t*
+glfs_opendir (glfs_t *fs, const char *path) __THROW
GFAPI_PUBLIC(glfs_opendir, 3.4.0);
/*
@@ -637,12 +700,14 @@ glfs_fd_t *glfs_opendir (glfs_t *fs, const char *path) __THROW
* insufficient in the future.
*/
-int glfs_readdir_r (glfs_fd_t *fd, struct dirent *dirent,
- struct dirent **result) __THROW
+int
+glfs_readdir_r (glfs_fd_t *fd, struct dirent *dirent,
+ struct dirent **result) __THROW
GFAPI_PUBLIC(glfs_readdir_r, 3.4.0);
-int glfs_readdirplus_r (glfs_fd_t *fd, struct stat *stat, struct dirent *dirent,
- struct dirent **result) __THROW
+int
+glfs_readdirplus_r (glfs_fd_t *fd, struct stat *stat, struct dirent *dirent,
+ struct dirent **result) __THROW
GFAPI_PUBLIC(glfs_readdirplus_r, 3.4.0);
/*
@@ -652,128 +717,161 @@ int glfs_readdirplus_r (glfs_fd_t *fd, struct stat *stat, struct dirent *dirent,
* referring to the same directory too.)
*/
-struct dirent *glfs_readdir (glfs_fd_t *fd) __THROW
+struct dirent*
+glfs_readdir (glfs_fd_t *fd) __THROW
GFAPI_PUBLIC(glfs_readdir, 3.5.0);
-struct dirent *glfs_readdirplus (glfs_fd_t *fd, struct stat *stat) __THROW
+struct dirent*
+glfs_readdirplus (glfs_fd_t *fd, struct stat *stat) __THROW
GFAPI_PUBLIC(glfs_readdirplus, 3.5.0);
-long glfs_telldir (glfs_fd_t *fd) __THROW
+long
+glfs_telldir (glfs_fd_t *fd) __THROW
GFAPI_PUBLIC(glfs_telldir, 3.4.0);
-void glfs_seekdir (glfs_fd_t *fd, long offset) __THROW
+void
+glfs_seekdir (glfs_fd_t *fd, long offset) __THROW
GFAPI_PUBLIC(glfs_seekdir, 3.4.0);
-int glfs_closedir (glfs_fd_t *fd) __THROW
+int
+glfs_closedir (glfs_fd_t *fd) __THROW
GFAPI_PUBLIC(glfs_closedir, 3.4.0);
-int glfs_statvfs (glfs_t *fs, const char *path, struct statvfs *buf) __THROW
+int
+glfs_statvfs (glfs_t *fs, const char *path, struct statvfs *buf) __THROW
GFAPI_PUBLIC(glfs_statvfs, 3.4.0);
-int glfs_chmod (glfs_t *fs, const char *path, mode_t mode) __THROW
+int
+glfs_chmod (glfs_t *fs, const char *path, mode_t mode) __THROW
GFAPI_PUBLIC(glfs_chmod, 3.4.0);
-int glfs_fchmod (glfs_fd_t *fd, mode_t mode) __THROW
+int
+glfs_fchmod (glfs_fd_t *fd, mode_t mode) __THROW
GFAPI_PUBLIC(glfs_fchmod, 3.4.0);
-int glfs_chown (glfs_t *fs, const char *path, uid_t uid, gid_t gid) __THROW
+int
+glfs_chown (glfs_t *fs, const char *path, uid_t uid, gid_t gid) __THROW
GFAPI_PUBLIC(glfs_chown, 3.4.0);
-int glfs_lchown (glfs_t *fs, const char *path, uid_t uid, gid_t gid) __THROW
+int
+glfs_lchown (glfs_t *fs, const char *path, uid_t uid, gid_t gid) __THROW
GFAPI_PUBLIC(glfs_lchown, 3.4.0);
-int glfs_fchown (glfs_fd_t *fd, uid_t uid, gid_t gid) __THROW
+int
+glfs_fchown (glfs_fd_t *fd, uid_t uid, gid_t gid) __THROW
GFAPI_PUBLIC(glfs_fchown, 3.4.0);
-int glfs_utimens (glfs_t *fs, const char *path,
- const struct timespec times[2]) __THROW
+int
+glfs_utimens (glfs_t *fs, const char *path,
+ const struct timespec times[2]) __THROW
GFAPI_PUBLIC(glfs_utimens, 3.4.0);
-int glfs_lutimens (glfs_t *fs, const char *path,
- const struct timespec times[2]) __THROW
+int
+glfs_lutimens (glfs_t *fs, const char *path,
+ const struct timespec times[2]) __THROW
GFAPI_PUBLIC(glfs_lutimens, 3.4.0);
-int glfs_futimens (glfs_fd_t *fd, const struct timespec times[2]) __THROW
+int
+glfs_futimens (glfs_fd_t *fd, const struct timespec times[2]) __THROW
GFAPI_PUBLIC(glfs_futimens, 3.4.0);
-ssize_t glfs_getxattr (glfs_t *fs, const char *path, const char *name,
- void *value, size_t size) __THROW
+ssize_t
+glfs_getxattr (glfs_t *fs, const char *path, const char *name, void *value,
+ size_t size) __THROW
GFAPI_PUBLIC(glfs_getxattr, 3.4.0);
-ssize_t glfs_lgetxattr (glfs_t *fs, const char *path, const char *name,
- void *value, size_t size) __THROW
+ssize_t
+glfs_lgetxattr (glfs_t *fs, const char *path, const char *name, void *value,
+ size_t size) __THROW
GFAPI_PUBLIC(glfs_lgetxattr, 3.4.0);
-ssize_t glfs_fgetxattr (glfs_fd_t *fd, const char *name,
- void *value, size_t size) __THROW
+ssize_t
+glfs_fgetxattr (glfs_fd_t *fd, const char *name, void *value,
+ size_t size) __THROW
GFAPI_PUBLIC(glfs_fgetxattr, 3.4.0);
-ssize_t glfs_listxattr (glfs_t *fs, const char *path,
- void *value, size_t size) __THROW
+ssize_t
+glfs_listxattr (glfs_t *fs, const char *path, void *value, size_t size) __THROW
GFAPI_PUBLIC(glfs_listxattr, 3.4.0);
-ssize_t glfs_llistxattr (glfs_t *fs, const char *path, void *value,
- size_t size) __THROW
+ssize_t
+glfs_llistxattr (glfs_t *fs, const char *path, void *value, size_t size) __THROW
GFAPI_PUBLIC(glfs_llistxattr, 3.4.0);
-ssize_t glfs_flistxattr (glfs_fd_t *fd, void *value, size_t size) __THROW
+ssize_t
+glfs_flistxattr (glfs_fd_t *fd, void *value, size_t size) __THROW
GFAPI_PUBLIC(glfs_flistxattr, 3.4.0);
-int glfs_setxattr (glfs_t *fs, const char *path, const char *name,
- const void *value, size_t size, int flags) __THROW
+int
+glfs_setxattr (glfs_t *fs, const char *path, const char *name,
+ const void *value, size_t size, int flags) __THROW
GFAPI_PUBLIC(glfs_setxattr, 3.4.0);
-int glfs_lsetxattr (glfs_t *fs, const char *path, const char *name,
- const void *value, size_t size, int flags) __THROW
+int
+glfs_lsetxattr (glfs_t *fs, const char *path, const char *name,
+ const void *value, size_t size, int flags) __THROW
GFAPI_PUBLIC(glfs_lsetxattr, 3.4.0);
-int glfs_fsetxattr (glfs_fd_t *fd, const char *name,
- const void *value, size_t size, int flags) __THROW
+int
+glfs_fsetxattr (glfs_fd_t *fd, const char *name, const void *value,
+ size_t size, int flags) __THROW
GFAPI_PUBLIC(glfs_fsetxattr, 3.4.0);
-int glfs_removexattr (glfs_t *fs, const char *path, const char *name) __THROW
+int
+glfs_removexattr (glfs_t *fs, const char *path, const char *name) __THROW
GFAPI_PUBLIC(glfs_removexattr, 3.4.0);
-int glfs_lremovexattr (glfs_t *fs, const char *path, const char *name) __THROW
+int
+glfs_lremovexattr (glfs_t *fs, const char *path, const char *name) __THROW
GFAPI_PUBLIC(glfs_lremovexattr, 3.4.0);
-int glfs_fremovexattr (glfs_fd_t *fd, const char *name) __THROW
+int
+glfs_fremovexattr (glfs_fd_t *fd, const char *name) __THROW
GFAPI_PUBLIC(glfs_fremovexattr, 3.4.0);
-int glfs_fallocate(glfs_fd_t *fd, int keep_size,
- off_t offset, size_t len) __THROW
+int
+glfs_fallocate(glfs_fd_t *fd, int keep_size, off_t offset, size_t len) __THROW
GFAPI_PUBLIC(glfs_fallocate, 3.5.0);
-int glfs_discard(glfs_fd_t *fd, off_t offset, size_t len) __THROW
+int
+glfs_discard(glfs_fd_t *fd, off_t offset, size_t len) __THROW
GFAPI_PUBLIC(glfs_discard, 3.5.0);
-
-int glfs_discard_async (glfs_fd_t *fd, off_t length, size_t lent,
- glfs_io_cbk fn, void *data) __THROW
+int
+glfs_discard_async (glfs_fd_t *fd, off_t length, size_t lent, glfs_io_cbk fn,
+ void *data) __THROW
GFAPI_PUBLIC(glfs_discard_async, future);
-int glfs_zerofill(glfs_fd_t *fd, off_t offset, off_t len) __THROW
+int
+glfs_zerofill(glfs_fd_t *fd, off_t offset, off_t len) __THROW
GFAPI_PUBLIC(glfs_zerofill, 3.5.0);
-int glfs_zerofill_async (glfs_fd_t *fd, off_t length, off_t len,
- glfs_io_cbk fn, void *data) __THROW
+int
+glfs_zerofill_async (glfs_fd_t *fd, off_t length, off_t len, glfs_io_cbk fn,
+ void *data) __THROW
GFAPI_PUBLIC(glfs_zerofill_async, future);
-char *glfs_getcwd (glfs_t *fs, char *buf, size_t size) __THROW
+char*
+glfs_getcwd (glfs_t *fs, char *buf, size_t size) __THROW
GFAPI_PUBLIC(glfs_getcwd, 3.4.0);
-int glfs_chdir (glfs_t *fs, const char *path) __THROW
+int
+glfs_chdir (glfs_t *fs, const char *path) __THROW
GFAPI_PUBLIC(glfs_chdir, 3.4.0);
-int glfs_fchdir (glfs_fd_t *fd) __THROW
+int
+glfs_fchdir (glfs_fd_t *fd) __THROW
GFAPI_PUBLIC(glfs_fchdir, 3.4.0);
-char *glfs_realpath (glfs_t *fs, const char *path, char *resolved_path) __THROW
+char*
+glfs_realpath (glfs_t *fs, const char *path, char *resolved_path) __THROW
GFAPI_PUBLIC(glfs_realpath, 3.7.17);
+
/*
* @cmd and @flock are as specified in man fcntl(2).
*/
-int glfs_posix_lock (glfs_fd_t *fd, int cmd, struct flock *flock) __THROW
+int
+glfs_posix_lock (glfs_fd_t *fd, int cmd, struct flock *flock) __THROW
GFAPI_PUBLIC(glfs_posix_lock, 3.4.0);
/*
@@ -811,19 +909,23 @@ int glfs_posix_lock (glfs_fd_t *fd, int cmd, struct flock *flock) __THROW
*/
/* Lock modes used by glfs_file_lock() */
-enum glfs_lock_mode_t {
+enum glfs_lock_mode {
GLFS_LK_ADVISORY = 0,
GLFS_LK_MANDATORY
};
+typedef enum glfs_lock_mode glfs_lock_mode_t;
-int glfs_file_lock (glfs_fd_t *fd, int cmd, struct flock *flock,
- enum glfs_lock_mode_t lk_mode) __THROW
+int
+glfs_file_lock (glfs_fd_t *fd, int cmd, struct flock *flock,
+ glfs_lock_mode_t lk_mode) __THROW
GFAPI_PUBLIC(glfs_file_lock, 3.13.0);
-glfs_fd_t *glfs_dup (glfs_fd_t *fd) __THROW
+glfs_fd_t*
+glfs_dup (glfs_fd_t *fd) __THROW
GFAPI_PUBLIC(glfs_dup, 3.4.0);
-void glfs_free (void *ptr) __THROW
+void
+glfs_free (void *ptr) __THROW
GFAPI_PUBLIC(glfs_free, 3.7.16);
/*
@@ -836,7 +938,8 @@ void glfs_free (void *ptr) __THROW
* value does not way anythin about the result of the @sysrq execution. Not all
* @sysrq command will be able to return a success/failure status.
*/
-int glfs_sysrq (glfs_t *fs, char sysrq) __THROW
+int
+glfs_sysrq (glfs_t *fs, char sysrq) __THROW
GFAPI_PUBLIC(glfs_sysrq, 3.10.0);
#define GLFS_SYSRQ_HELP 'h' /* log a message with supported sysrq commands */
@@ -847,6 +950,7 @@ int glfs_sysrq (glfs_t *fs, char sysrq) __THROW
* Structure returned as part of xreaddirplus
*/
struct glfs_xreaddirp_stat;
+typedef struct glfs_xreaddirp_stat glfs_xreaddirp_stat_t;
/* Request flags to be used in XREADDIRP operation */
#define GFAPI_XREADDIRP_NULL 0x00000000 /* by default, no stat will be fetched */
@@ -857,7 +961,7 @@ struct glfs_xreaddirp_stat;
* This stat structure returned gets freed as part of glfs_free(xstat)
*/
struct stat*
-glfs_xreaddirplus_get_stat (struct glfs_xreaddirp_stat *xstat) __THROW
+glfs_xreaddirplus_get_stat (glfs_xreaddirp_stat_t *xstat) __THROW
GFAPI_PUBLIC(glfs_xreaddirplus_get_stat, 3.11.0);
/*
@@ -903,9 +1007,9 @@ glfs_xreaddirplus_get_stat (struct glfs_xreaddirp_stat *xstat) __THROW
* -1: FAILURE
*/
int
-glfs_xreaddirplus_r (struct glfs_fd *glfd, uint32_t flags,
- struct glfs_xreaddirp_stat **xstat_p,
- struct dirent *ext, struct dirent **res) __THROW
+glfs_xreaddirplus_r (glfs_fd_t *glfd, uint32_t flags,
+ glfs_xreaddirp_stat_t **xstat_p, struct dirent *ext,
+ struct dirent **res) __THROW
GFAPI_PUBLIC(glfs_xreaddirplus_r, 3.11.0);
#define GFAPI_MAX_LOCK_OWNER_LEN 255
@@ -934,7 +1038,8 @@ glfs_xreaddirplus_r (struct glfs_fd *glfd, uint32_t flags,
* 0: SUCCESS
* -1: FAILURE
*/
-int glfs_fd_set_lkowner (glfs_fd_t *glfd, void *data, int len) __THROW
+int
+glfs_fd_set_lkowner (glfs_fd_t *glfd, void *data, int len) __THROW
GFAPI_PUBLIC(glfs_fd_set_lkowner, 3.10.7);
/*
@@ -958,18 +1063,20 @@ int glfs_fd_set_lkowner (glfs_fd_t *glfd, void *data, int len) __THROW
* freed while in this routine.
*/
struct glfs_upcall;
+typedef struct glfs_upcall glfs_upcall_t;
-struct glfs*
-glfs_upcall_get_fs (struct glfs_upcall *arg) __THROW
+glfs_t*
+glfs_upcall_get_fs (glfs_upcall_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_get_fs, 3.7.16);
enum glfs_upcall_reason {
GLFS_UPCALL_EVENT_NULL = 0,
GLFS_UPCALL_INODE_INVALIDATE, /* invalidate cache entry */
};
+typedef enum glfs_upcall_reason glfs_upcall_reason_t;
-enum glfs_upcall_reason
-glfs_upcall_get_reason (struct glfs_upcall *arg) __THROW
+glfs_upcall_reason_t
+glfs_upcall_get_reason (glfs_upcall_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_get_reason, 3.7.16);
@@ -990,7 +1097,7 @@ glfs_upcall_get_reason (struct glfs_upcall *arg) __THROW
* glfs_upcall.
*/
void*
-glfs_upcall_get_event (struct glfs_upcall *arg) __THROW
+glfs_upcall_get_event (glfs_upcall_t *arg) __THROW
GFAPI_PUBLIC(glfs_upcall_get_event, 3.7.16);
/*
@@ -1012,7 +1119,7 @@ glfs_upcall_get_event (struct glfs_upcall *arg) __THROW
* registering of upcall events. This may be used by the caller for any
* of its internal use while processing upcalls.
*/
-typedef void (*glfs_upcall_cbk) (struct glfs_upcall *up_arg, void *data);
+typedef void (*glfs_upcall_cbk) (glfs_upcall_t *up_arg, void *data);
/*
* List of upcall events supported by gluster/gfapi
@@ -1054,8 +1161,8 @@ typedef void (*glfs_upcall_cbk) (struct glfs_upcall *up_arg, void *data);
* -1: FAILURE
*/
int
-glfs_upcall_register (struct glfs *fs, uint32_t event_list,
- glfs_upcall_cbk cbk, void *data) __THROW
+glfs_upcall_register (glfs_t *fs, uint32_t event_list, glfs_upcall_cbk cbk,
+ void *data) __THROW
GFAPI_PUBLIC(glfs_upcall_register, 3.13.0);
/*
@@ -1082,7 +1189,7 @@ glfs_upcall_register (struct glfs *fs, uint32_t event_list,
* -1: FAILURE
*/
int
-glfs_upcall_unregister (struct glfs *fs, uint32_t event_list) __THROW
+glfs_upcall_unregister (glfs_t *fs, uint32_t event_list) __THROW
GFAPI_PUBLIC(glfs_upcall_unregister, 3.13.0);
/* Lease Types */
@@ -1106,8 +1213,9 @@ struct glfs_lease {
glfs_leaseid_t lease_id;
unsigned int lease_flags;
};
+typedef struct glfs_lease glfs_lease_t;
-typedef void (*glfs_recall_cbk) (struct glfs_lease lease, void *data);
+typedef void (*glfs_recall_cbk) (glfs_lease_t lease, void *data);
/*
SYNOPSIS
@@ -1151,10 +1259,10 @@ typedef void (*glfs_recall_cbk) (struct glfs_lease lease, void *data);
0: Successfull completion
<0: Failure. @errno will be set with the type of failure
*/
-struct gf_upcall;
-int glfs_lease (struct glfs_fd *glfd, struct glfs_lease *lease,
- glfs_recall_cbk fn, void *data) __THROW
+int glfs_lease (glfs_fd_t *glfd, glfs_lease_t *lease, glfs_recall_cbk fn,
+ void *data) __THROW
GFAPI_PUBLIC(glfs_lease, 4.0.0);
+
__END_DECLS
#endif /* !_GLFS_H */