From 0ba8c6113058ae2ab2a2e38e11a2c95d75056a3b Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Wed, 21 May 2014 17:09:49 +0530 Subject: libgfapi: Added Handle-based ops to get/set/remove extended attributes in the libgfapi. Cherry picked from commit Change-Id: I1a8e666018d7b93e0bba2d9882935681da909980 and Change-Id: I62f63da37edf722d6d79c75f72ee7403e93e4936 > BUG: 1089414 > Signed-off-by: Soumya Koduri > Reviewed-on: http://review.gluster.org/7308 > Reviewed-by: Vijay Bellur > Tested-by: Vijay Bellur This patch differs a bit from its earlier master patch - * 'DECODE_SYNCOP_ERR' macro is not defined in this code branch. So lines where this macro is used are skipped. * 'syncop_removexattr(..)' definition differs from the one in the master branch. BUG: 1099878 Change-Id: I1e9cce4efeec038b9736065d39887c35752caead Signed-off-by: Soumya Koduri Reviewed-on: http://review.gluster.org/7825 Reviewed-by: Raghavendra G Tested-by: Gluster Build System Reviewed-by: Niels de Vos --- api/src/glfs-handles.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'api/src/glfs-handles.h') diff --git a/api/src/glfs-handles.h b/api/src/glfs-handles.h index 437f2cbc8a5..d095d9e622f 100644 --- a/api/src/glfs-handles.h +++ b/api/src/glfs-handles.h @@ -111,9 +111,17 @@ int glfs_h_stat(struct glfs *fs, struct glfs_object *object, struct stat *stat); int glfs_h_getattrs (struct glfs *fs, struct glfs_object *object, struct stat *stat); +int glfs_h_getxattrs (struct glfs *fs, struct glfs_object *object, + const char *name, void *value, + size_t size) __THROW; + int glfs_h_setattrs (struct glfs *fs, struct glfs_object *object, struct stat *sb, int valid); +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_readlink (struct glfs *fs, struct glfs_object *object, char *buf, size_t bufsiz); @@ -124,6 +132,9 @@ int glfs_h_rename (struct glfs *fs, struct glfs_object *olddir, const char *oldname, struct glfs_object *newdir, const char *newname); +int glfs_h_removexattrs (struct glfs *fs, struct glfs_object *object, + const char *name) __THROW; + /* Operations enabling opaque invariant handle to object transitions */ ssize_t glfs_h_extract_handle (struct glfs_object *object, unsigned char *handle, int len); @@ -140,4 +151,4 @@ struct glfs_fd *glfs_h_open (struct glfs *fs, struct glfs_object *object, __END_DECLS -#endif /* !_GLFS_HANDLES_H */ \ No newline at end of file +#endif /* !_GLFS_HANDLES_H */ -- cgit