From e11d66c8d6dea72d02f9bcdbf65c67bd5c60b5cc Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 1 Oct 2009 06:58:47 +0000 Subject: Global: NFS-friendly prototype changes Signed-off-by: Anand V. Avati BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145 --- libglusterfs/src/defaults.c | 103 +++++++++++++++++++++++++++++++------------- 1 file changed, 73 insertions(+), 30 deletions(-) (limited to 'libglusterfs/src/defaults.c') diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index f72eca1f8..a21630103 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -41,14 +41,16 @@ default_lookup_cbk (call_frame_t *frame, int32_t op_errno, inode_t *inode, struct stat *buf, - dict_t *dict) + dict_t *dict, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, inode, buf, - dict); + dict, + postparent); return 0; } @@ -234,12 +236,14 @@ default_truncate_cbk (call_frame_t *frame, xlator_t *this, int32_t op_ret, int32_t op_errno, - struct stat *buf) + struct stat *prebuf, + struct stat *postbuf) { STACK_UNWIND (frame, op_ret, op_errno, - buf); + prebuf, + postbuf); return 0; } @@ -264,12 +268,14 @@ default_ftruncate_cbk (call_frame_t *frame, xlator_t *this, int32_t op_ret, int32_t op_errno, - struct stat *buf) + struct stat *prebuf, + struct stat *postbuf) { STACK_UNWIND (frame, op_ret, op_errno, - buf); + prebuf, + postbuf); return 0; } @@ -354,12 +360,14 @@ default_readlink_cbk (call_frame_t *frame, xlator_t *this, int32_t op_ret, int32_t op_errno, - const char *path) + const char *path, + struct stat *buf) { STACK_UNWIND (frame, op_ret, op_errno, - path); + path, + buf); return 0; } @@ -386,13 +394,17 @@ default_mknod_cbk (call_frame_t *frame, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, + struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, inode, - buf); + buf, + preparent, + postparent); return 0; } @@ -418,13 +430,17 @@ default_mkdir_cbk (call_frame_t *frame, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, + struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, op_errno, inode, - buf); + buf, + preparent, + postparent); return 0; } @@ -447,9 +463,11 @@ default_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, - int32_t op_errno) + int32_t op_errno, + struct stat *preparent, + struct stat *postparent) { - STACK_UNWIND (frame, op_ret, op_errno); + STACK_UNWIND (frame, op_ret, op_errno, preparent, postparent); return 0; } @@ -471,11 +489,15 @@ default_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, - int32_t op_errno) + int32_t op_errno, + struct stat *preparent, + struct stat *postparent) { STACK_UNWIND (frame, op_ret, - op_errno); + op_errno, + preparent, + postparent); return 0; } @@ -500,9 +522,12 @@ default_symlink_cbk (call_frame_t *frame, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, + struct stat *preparent, + struct stat *postparent) { - STACK_UNWIND (frame, op_ret, op_errno, inode, buf); + STACK_UNWIND (frame, op_ret, op_errno, inode, buf, preparent, + postparent); return 0; } @@ -527,9 +552,14 @@ default_rename_cbk (call_frame_t *frame, xlator_t *this, int32_t op_ret, int32_t op_errno, - struct stat *buf) + struct stat *buf, + struct stat *preoldparent, + struct stat *postoldparent, + struct stat *prenewparent, + struct stat *postnewparent) { - STACK_UNWIND (frame, op_ret, op_errno, buf); + STACK_UNWIND (frame, op_ret, op_errno, buf, preoldparent, postoldparent, + prenewparent, postnewparent); return 0; } @@ -555,9 +585,12 @@ default_link_cbk (call_frame_t *frame, int32_t op_ret, int32_t op_errno, inode_t *inode, - struct stat *buf) + struct stat *buf, + struct stat *preparent, + struct stat *postparent) { - STACK_UNWIND (frame, op_ret, op_errno, inode, buf); + STACK_UNWIND (frame, op_ret, op_errno, inode, buf, preparent, + postparent); return 0; } @@ -584,9 +617,12 @@ default_create_cbk (call_frame_t *frame, int32_t op_errno, fd_t *fd, inode_t *inode, - struct stat *buf) + struct stat *buf, + struct stat *preparent, + struct stat *postparent) { - STACK_UNWIND (frame, op_ret, op_errno, fd, inode, buf); + STACK_UNWIND (frame, op_ret, op_errno, fd, inode, buf, preparent, + postparent); return 0; } @@ -623,13 +659,14 @@ int32_t default_open (call_frame_t *frame, xlator_t *this, loc_t *loc, - int32_t flags, fd_t *fd) + int32_t flags, fd_t *fd, + int32_t wbflags) { STACK_WIND (frame, default_open_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->open, - loc, flags, fd); + loc, flags, fd, wbflags); return 0; } @@ -678,12 +715,14 @@ default_writev_cbk (call_frame_t *frame, xlator_t *this, int32_t op_ret, int32_t op_errno, - struct stat *stbuf) + struct stat *prebuf, + struct stat *postbuf) { STACK_UNWIND (frame, op_ret, op_errno, - stbuf); + prebuf, + postbuf); return 0; } @@ -740,11 +779,15 @@ default_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, - int32_t op_errno) + int32_t op_errno, + struct stat *prebuf, + struct stat *postbuf) { STACK_UNWIND (frame, op_ret, - op_errno); + op_errno, + prebuf, + postbuf); return 0; } -- cgit