diff options
| author | Raghavendra Talur <rtalur@redhat.com> | 2015-03-11 18:36:01 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2015-04-08 15:14:59 +0000 | 
| commit | 346e64e578573296028efa516cd93cfaf2b17b8f (patch) | |
| tree | 5858b85260226377f23358fbd227e63d44abea5d /libglusterfs/src/syncop.h | |
| parent | 4f0c068d8fe2654f205202e129e673aaa9342c63 (diff) | |
libglusterfs/syncop: Add xdata to all syncop calls
This patch adds support for xdata in both the
request and response path of syncops.
Few calls like lookup already had the support;
have renamed variables in few places to maintain
uniformity.
xdata passed downwards is known as xdata_in
and xdata passed upwards is known as xdata_out.
There is an old patch by Jeff Darcy at
http://review.gluster.org/#/c/8769/3 which does the
same for some selected calls. It also brings in
xdata support at gfapi level.
xdata support at gfapi level would be introduced
in subsequent patches.
Change-Id: I340e94ebaf2a38e160e65bc30732e8fe1c532dcc
BUG: 1158621
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/9859
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src/syncop.h')
| -rw-r--r-- | libglusterfs/src/syncop.h | 156 | 
1 files changed, 104 insertions, 52 deletions
diff --git a/libglusterfs/src/syncop.h b/libglusterfs/src/syncop.h index a9244a51552..e9d3428c512 100644 --- a/libglusterfs/src/syncop.h +++ b/libglusterfs/src/syncop.h @@ -348,99 +348,151 @@ int syncbarrier_wait (syncbarrier_t *barrier, int waitfor);  int syncbarrier_wake (syncbarrier_t *barrier);  int syncbarrier_destroy (syncbarrier_t *barrier); -int syncop_lookup (xlator_t *subvol, loc_t *loc, dict_t *xattr_req, +int syncop_lookup (xlator_t *subvol, loc_t *loc,                     /* out */ -                   struct iatt *iatt, dict_t **xattr_rsp, struct iatt *parent); +                   struct iatt *iatt, struct iatt *parent, +                   /* xdata */ +                   dict_t *xdata_in, dict_t **xdata_out);  int syncop_readdirp (xlator_t *subvol, fd_t *fd, size_t size, off_t off, -                     dict_t *dict,                       /* out */ -                     gf_dirent_t *entries); +                     gf_dirent_t *entries, +                     dict_t *xdata_in, dict_t **xdata_out);  int syncop_readdir (xlator_t *subvol, fd_t *fd, size_t size, off_t off, -                    gf_dirent_t *entries); +                    gf_dirent_t *entries, dict_t *xdata_in, dict_t **xdata_out); -int syncop_opendir (xlator_t *subvol, loc_t *loc, fd_t *fd); +int syncop_opendir (xlator_t *subvol, loc_t *loc, fd_t *fd, dict_t *xdata_in, +                    dict_t **xdata_out);  int syncop_setattr (xlator_t *subvol, loc_t *loc, struct iatt *iatt, int valid,                      /* out */ -                    struct iatt *preop, struct iatt *postop); +                    struct iatt *preop, struct iatt *postop, dict_t *xdata_in, +                    dict_t **xdata_out);  int syncop_fsetattr (xlator_t *subvol, fd_t *fd, struct iatt *iatt, int valid,                      /* out */ -                    struct iatt *preop, struct iatt *postop); +                    struct iatt *preop, struct iatt *postop, dict_t *xdata_in, +                    dict_t **xdata_out); -int syncop_statfs (xlator_t *subvol, loc_t *loc, dict_t *xattr_req, +int syncop_statfs (xlator_t *subvol, loc_t *loc,                     /* out */ -                   struct statvfs *buf, dict_t **xattr_rsp); +                   struct statvfs *buf, +                   dict_t *xdata_in, dict_t **xdata_out); + +int syncop_setxattr (xlator_t *subvol, loc_t *loc, dict_t *dict, int32_t flags, +		     dict_t *xdata_in, dict_t **xdata_out); + +int syncop_fsetxattr (xlator_t *subvol, fd_t *fd, dict_t *dict, int32_t flags, +		      dict_t *xdata_in, dict_t **xdata_out); + +int syncop_listxattr (xlator_t *subvol, loc_t *loc, dict_t **dict, +		      dict_t *xdata_in, dict_t **xdata_out); -int syncop_setxattr (xlator_t *subvol, loc_t *loc, dict_t *dict, int32_t flags); -int syncop_fsetxattr (xlator_t *subvol, fd_t *fd, dict_t *dict, int32_t flags); -int syncop_listxattr (xlator_t *subvol, loc_t *loc, dict_t **dict);  int syncop_getxattr (xlator_t *xl, loc_t *loc, dict_t **dict, const char *key, -                     dict_t *xdata); +                     dict_t *xdata_in, dict_t **xdata_out); +  int syncop_fgetxattr (xlator_t *xl, fd_t *fd, dict_t **dict, const char *key, -                      dict_t *xdata); +                      dict_t *xdata_in, dict_t **xdata_out); +  int syncop_removexattr (xlator_t *subvol, loc_t *loc, const char *name, -			dict_t *xdata); +			dict_t *xdata_in, dict_t **xdata_out); +  int syncop_fremovexattr (xlator_t *subvol, fd_t *fd, const char *name, -			 dict_t *xdata); +			 dict_t *xdata_in, dict_t **xdata_out);  int syncop_create (xlator_t *subvol, loc_t *loc, int32_t flags, mode_t mode, -                   fd_t *fd, dict_t *dict, struct iatt *iatt); -int syncop_open (xlator_t *subvol, loc_t *loc, int32_t flags, fd_t *fd); +                   fd_t *fd, struct iatt *iatt, +                   dict_t *xdata_in, dict_t **xdata_out); + +int syncop_open (xlator_t *subvol, loc_t *loc, int32_t flags, fd_t *fd, +		 dict_t *xdata_in, dict_t **xdata_out); +  int syncop_close (fd_t *fd);  int syncop_write (xlator_t *subvol, fd_t *fd, const char *buf, int size, -                  off_t offset, struct iobref *iobref, uint32_t flags); +                  off_t offset, struct iobref *iobref, uint32_t flags, +		  dict_t *xdata_in, dict_t **xdata_out); +  int syncop_writev (xlator_t *subvol, fd_t *fd, const struct iovec *vector,                     int32_t count, off_t offset, struct iobref *iobref, -                   uint32_t flags); +                   uint32_t flags, dict_t *xdata_in, dict_t **xdata_out); +  int syncop_readv (xlator_t *subvol, fd_t *fd, size_t size, off_t off,                    uint32_t flags,                    /* out */ -                  struct iovec **vector, int *count, struct iobref **iobref); +                  struct iovec **vector, int *count, struct iobref **iobref, +		  dict_t *xdata_in, dict_t **xdata_out); + +int syncop_ftruncate (xlator_t *subvol, fd_t *fd, off_t offset, +                      dict_t *xdata_in, dict_t **xdata_out); + +int syncop_truncate (xlator_t *subvol, loc_t *loc, off_t offset, +                     dict_t *xdata_in, dict_t **xdata_out); -int syncop_ftruncate (xlator_t *subvol, fd_t *fd, off_t offset); -int syncop_truncate (xlator_t *subvol, loc_t *loc, off_t offset); +int syncop_unlink (xlator_t *subvol, loc_t *loc, dict_t *xdata_in, +                   dict_t **xdata_out); -int syncop_unlink (xlator_t *subvol, loc_t *loc); -int syncop_rmdir (xlator_t *subvol, loc_t *loc, int flags); +int syncop_rmdir (xlator_t *subvol, loc_t *loc, int flags, dict_t *xdata_in, +                  dict_t **xdata_out); -int syncop_fsync (xlator_t *subvol, fd_t *fd, int dataonly); -int syncop_flush (xlator_t *subvol, fd_t *fd); -int syncop_fstat (xlator_t *subvol, fd_t *fd, struct iatt *stbuf); -int syncop_stat (xlator_t *subvol, loc_t *loc, struct iatt *stbuf); +int syncop_fsync (xlator_t *subvol, fd_t *fd, int dataonly, dict_t *xdata_in, +                  dict_t **xdata_out); + +int syncop_flush (xlator_t *subvol, fd_t *fd, dict_t *xdata_in, +                  dict_t **xdata_out); + +int syncop_fstat (xlator_t *subvol, fd_t *fd, struct iatt *stbuf, +		  dict_t *xdata_in, dict_t **xdata_out); + +int syncop_stat (xlator_t *subvol, loc_t *loc, struct iatt *stbuf, +		 dict_t *xdata_in, dict_t **xdata_out);  int syncop_symlink (xlator_t *subvol, loc_t *loc, const char *newpath, -                    dict_t *dict, struct iatt *iatt); -int syncop_readlink (xlator_t *subvol, loc_t *loc, char **buffer, size_t size); +                    struct iatt *iatt, +                    dict_t *xdata_in, dict_t **xdata_out); + +int syncop_readlink (xlator_t *subvol, loc_t *loc, char **buffer, size_t size, +		     dict_t *xdata_in, dict_t **xdata_out); +  int syncop_mknod (xlator_t *subvol, loc_t *loc, mode_t mode, dev_t rdev, -                  dict_t *dict, struct iatt *iatt); -int syncop_mkdir (xlator_t *subvol, loc_t *loc, mode_t mode, dict_t *dict, -		  struct iatt *iatt); -int syncop_link (xlator_t *subvol, loc_t *oldloc, loc_t *newloc); -int syncop_fsyncdir (xlator_t *subvol, fd_t *fd, int datasync); -int syncop_access (xlator_t *subvol, loc_t *loc, int32_t mask); -int syncop_fallocate(xlator_t *subvol, fd_t *fd, int32_t keep_size, off_t offset, -		     size_t len); -int syncop_discard(xlator_t *subvol, fd_t *fd, off_t offset, size_t len); +                  struct iatt *iatt, dict_t *xdata_in, dict_t **xdata_out); + +int syncop_mkdir (xlator_t *subvol, loc_t *loc, mode_t mode, struct iatt *iatt, +                  dict_t *xdata_in, dict_t **xdata_out); + +int syncop_link (xlator_t *subvol, loc_t *oldloc, loc_t *newloc, +                 dict_t *xdata_in, dict_t **xdata_out); + +int syncop_fsyncdir (xlator_t *subvol, fd_t *fd, int datasync, +                     dict_t *xdata_in, dict_t **xdata_out); + +int syncop_access (xlator_t *subvol, loc_t *loc, int32_t mask, +                   dict_t *xdata_in, dict_t **xdata_out); + +int syncop_fallocate(xlator_t *subvol, fd_t *fd, int32_t keep_size, +		     off_t offset, size_t len, dict_t *xdata_in, +                     dict_t **xdata_out); + +int syncop_discard(xlator_t *subvol, fd_t *fd, off_t offset, size_t len, +		   dict_t *xdata_in, dict_t **xdata_out); -int syncop_zerofill(xlator_t *subvol, fd_t *fd, off_t offset, off_t len); +int syncop_zerofill(xlator_t *subvol, fd_t *fd, off_t offset, off_t len, +		    dict_t *xdata_in, dict_t **xdata_out); -int syncop_rename (xlator_t *subvol, loc_t *oldloc, loc_t *newloc); +int syncop_rename (xlator_t *subvol, loc_t *oldloc, loc_t *newloc, +		   dict_t *xdata_in, dict_t **xdata_out); -int syncop_lk (xlator_t *subvol, fd_t *fd, int cmd, struct gf_flock *flock); +int syncop_lk (xlator_t *subvol, fd_t *fd, int cmd, struct gf_flock *flock, +	       dict_t *xdata_in, dict_t **xdata_out); -int -syncop_inodelk (xlator_t *subvol, const char *volume, loc_t *loc, int32_t cmd, -                struct gf_flock *lock, dict_t *xdata_req, dict_t **xdata_rsp); +int syncop_inodelk (xlator_t *subvol, const char *volume, loc_t *loc, +                    int32_t cmd, struct gf_flock *lock, dict_t *xdata_in, +                    dict_t **xdata_out); -int -syncop_ipc (xlator_t *subvol, int op, dict_t *xdata_in, dict_t **xdata_out); +int syncop_ipc (xlator_t *subvol, int op, dict_t *xdata_in, dict_t **xdata_out); -int -syncop_xattrop (xlator_t *subvol, loc_t *loc, gf_xattrop_flags_t flags, -                dict_t *dict, dict_t *xdata); +int syncop_xattrop (xlator_t *subvol, loc_t *loc, gf_xattrop_flags_t flags, +                    dict_t *dict, dict_t *xdata_in, dict_t **xdata_out);  #endif /* _SYNCOP_H */  | 
