diff options
| author | Amar Tumballi <amar@gluster.com> | 2011-03-16 09:38:35 +0000 |
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-17 11:57:27 -0700 |
| commit | 75bda6e41d9b244ab9d040a035582ea6bd4c8120 (patch) | |
| tree | 1678cdbef24d4902ff8c7622d3f969c3d73eaf67 /libglusterfs | |
| parent | 858944850adf7ec04898a15db90e231655ac4965 (diff) | |
libglusterfs/src/*.c: whitespace cleanup
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'libglusterfs')
| -rw-r--r-- | libglusterfs/src/call-stub.c | 5064 | ||||
| -rw-r--r-- | libglusterfs/src/checksum.c | 32 | ||||
| -rw-r--r-- | libglusterfs/src/common-utils.c | 1804 | ||||
| -rw-r--r-- | libglusterfs/src/compat-errno.c | 1593 | ||||
| -rw-r--r-- | libglusterfs/src/compat.c | 582 | ||||
| -rw-r--r-- | libglusterfs/src/dict.c | 2808 | ||||
| -rw-r--r-- | libglusterfs/src/event.c | 1516 | ||||
| -rw-r--r-- | libglusterfs/src/fd.c | 320 | ||||
| -rw-r--r-- | libglusterfs/src/gf-dirent.c | 60 | ||||
| -rw-r--r-- | libglusterfs/src/globals.c | 123 | ||||
| -rw-r--r-- | libglusterfs/src/graph-print.c | 20 | ||||
| -rw-r--r-- | libglusterfs/src/graph.c | 2 | ||||
| -rw-r--r-- | libglusterfs/src/hashfn.c | 274 | ||||
| -rw-r--r-- | libglusterfs/src/inode.c | 16 | ||||
| -rw-r--r-- | libglusterfs/src/iobuf.c | 79 | ||||
| -rw-r--r-- | libglusterfs/src/latency.c | 8 | ||||
| -rw-r--r-- | libglusterfs/src/rbthash.c | 1 | ||||
| -rw-r--r-- | libglusterfs/src/scheduler.c | 98 | ||||
| -rw-r--r-- | libglusterfs/src/stack.c | 40 | ||||
| -rw-r--r-- | libglusterfs/src/statedump.c | 142 | ||||
| -rw-r--r-- | libglusterfs/src/syncop.c | 53 | ||||
| -rw-r--r-- | libglusterfs/src/syscall.c | 94 | ||||
| -rw-r--r-- | libglusterfs/src/timer.c | 44 |
23 files changed, 7380 insertions, 7393 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index d3b29a39ad7..50a06502c8d 100644 --- a/libglusterfs/src/call-stub.c +++ b/libglusterfs/src/call-stub.c @@ -31,171 +31,171 @@ static call_stub_t * stub_new (call_frame_t *frame, - char wind, - glusterfs_fop_t fop) + char wind, + glusterfs_fop_t fop) { - call_stub_t *new = NULL; + call_stub_t *new = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - new = mem_get0 (frame->this->ctx->stub_mem_pool); - GF_VALIDATE_OR_GOTO ("call-stub", new, out); + new = mem_get0 (frame->this->ctx->stub_mem_pool); + GF_VALIDATE_OR_GOTO ("call-stub", new, out); - new->frame = frame; - new->wind = wind; - new->fop = fop; - new->stub_mem_pool = frame->this->ctx->stub_mem_pool; - INIT_LIST_HEAD (&new->list); + new->frame = frame; + new->wind = wind; + new->fop = fop; + new->stub_mem_pool = frame->this->ctx->stub_mem_pool; + INIT_LIST_HEAD (&new->list); out: - return new; + return new; } call_stub_t * fop_lookup_stub (call_frame_t *frame, - fop_lookup_t fn, - loc_t *loc, - dict_t *xattr_req) + fop_lookup_t fn, + loc_t *loc, + dict_t *xattr_req) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_LOOKUP); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_LOOKUP); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.lookup.fn = fn; + stub->args.lookup.fn = fn; - if (xattr_req) - stub->args.lookup.xattr_req = dict_ref (xattr_req); + if (xattr_req) + stub->args.lookup.xattr_req = dict_ref (xattr_req); - loc_copy (&stub->args.lookup.loc, loc); + loc_copy (&stub->args.lookup.loc, loc); out: - return stub; + return stub; } call_stub_t * fop_lookup_cbk_stub (call_frame_t *frame, - fop_lookup_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - inode_t *inode, - struct iatt *buf, + fop_lookup_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + inode_t *inode, + struct iatt *buf, dict_t *dict, struct iatt *postparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_LOOKUP); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_LOOKUP); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.lookup_cbk.fn = fn; - stub->args.lookup_cbk.op_ret = op_ret; - stub->args.lookup_cbk.op_errno = op_errno; - if (inode) - stub->args.lookup_cbk.inode = inode_ref (inode); - if (buf) - stub->args.lookup_cbk.buf = *buf; - if (dict) - stub->args.lookup_cbk.dict = dict_ref (dict); + stub->args.lookup_cbk.fn = fn; + stub->args.lookup_cbk.op_ret = op_ret; + stub->args.lookup_cbk.op_errno = op_errno; + if (inode) + stub->args.lookup_cbk.inode = inode_ref (inode); + if (buf) + stub->args.lookup_cbk.buf = *buf; + if (dict) + stub->args.lookup_cbk.dict = dict_ref (dict); if (postparent) stub->args.lookup_cbk.postparent = *postparent; out: - return stub; + return stub; } call_stub_t * fop_stat_stub (call_frame_t *frame, - fop_stat_t fn, - loc_t *loc) + fop_stat_t fn, + loc_t *loc) { - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + call_stub_t *stub = NULL; + + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_STAT); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_STAT); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.stat.fn = fn; - loc_copy (&stub->args.stat.loc, loc); + stub->args.stat.fn = fn; + loc_copy (&stub->args.stat.loc, loc); out: - return stub; + return stub; } call_stub_t * fop_stat_cbk_stub (call_frame_t *frame, - fop_stat_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct iatt *buf) + fop_stat_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + struct iatt *buf) { - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + call_stub_t *stub = NULL; + + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_STAT); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_STAT); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.stat_cbk.fn = fn; - stub->args.stat_cbk.op_ret = op_ret; - stub->args.stat_cbk.op_errno = op_errno; - if (op_ret == 0) - stub->args.stat_cbk.buf = *buf; + stub->args.stat_cbk.fn = fn; + stub->args.stat_cbk.op_ret = op_ret; + stub->args.stat_cbk.op_errno = op_errno; + if (op_ret == 0) + stub->args.stat_cbk.buf = *buf; out: - return stub; + return stub; } call_stub_t * fop_fstat_stub (call_frame_t *frame, - fop_fstat_t fn, - fd_t *fd) + fop_fstat_t fn, + fd_t *fd) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 1, GF_FOP_FSTAT); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_FSTAT); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.fstat.fn = fn; + stub->args.fstat.fn = fn; - if (fd) - stub->args.fstat.fd = fd_ref (fd); + if (fd) + stub->args.fstat.fd = fd_ref (fd); out: - return stub; + return stub; } call_stub_t * fop_fstat_cbk_stub (call_frame_t *frame, - fop_fstat_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct iatt *buf) + fop_fstat_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + struct iatt *buf) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_FSTAT); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_FSTAT); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.fstat_cbk.fn = fn; - stub->args.fstat_cbk.op_ret = op_ret; - stub->args.fstat_cbk.op_errno = op_errno; - if (buf) - stub->args.fstat_cbk.buf = *buf; + stub->args.fstat_cbk.fn = fn; + stub->args.fstat_cbk.op_ret = op_ret; + stub->args.fstat_cbk.op_errno = op_errno; + if (buf) + stub->args.fstat_cbk.buf = *buf; out: - return stub; + return stub; } @@ -203,503 +203,503 @@ out: call_stub_t * fop_truncate_stub (call_frame_t *frame, - fop_truncate_t fn, - loc_t *loc, - off_t off) + fop_truncate_t fn, + loc_t *loc, + off_t off) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_TRUNCATE); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_TRUNCATE); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.truncate.fn = fn; - loc_copy (&stub->args.truncate.loc, loc); - stub->args.truncate.off = off; + stub->args.truncate.fn = fn; + loc_copy (&stub->args.truncate.loc, loc); + stub->args.truncate.off = off; out: - return stub; + return stub; } call_stub_t * fop_truncate_cbk_stub (call_frame_t *frame, - fop_truncate_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct iatt *prebuf, + fop_truncate_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + struct iatt *prebuf, struct iatt *postbuf) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_TRUNCATE); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_TRUNCATE); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.truncate_cbk.fn = fn; - stub->args.truncate_cbk.op_ret = op_ret; - stub->args.truncate_cbk.op_errno = op_errno; - if (prebuf) - stub->args.truncate_cbk.prebuf = *prebuf; + stub->args.truncate_cbk.fn = fn; + stub->args.truncate_cbk.op_ret = op_ret; + stub->args.truncate_cbk.op_errno = op_errno; + if (prebuf) + stub->args.truncate_cbk.prebuf = *prebuf; if (postbuf) stub->args.truncate_cbk.postbuf = *postbuf; out: - return stub; + return stub; } call_stub_t * fop_ftruncate_stub (call_frame_t *frame, - fop_ftruncate_t fn, - fd_t *fd, - off_t off) + fop_ftruncate_t fn, + fd_t *fd, + off_t off) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 1, GF_FOP_FTRUNCATE); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_FTRUNCATE); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.ftruncate.fn = fn; - if (fd) - stub->args.ftruncate.fd = fd_ref (fd); + stub->args.ftruncate.fn = fn; + if (fd) + stub->args.ftruncate.fd = fd_ref (fd); - stub->args.ftruncate.off = off; + stub->args.ftruncate.off = off; out: - return stub; + return stub; } call_stub_t * fop_ftruncate_cbk_stub (call_frame_t *frame, - fop_ftruncate_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct iatt *prebuf, + fop_ftruncate_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + struct iatt *prebuf, struct iatt *postbuf) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_FTRUNCATE); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_FTRUNCATE); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.ftruncate_cbk.fn = fn; - stub->args.ftruncate_cbk.op_ret = op_ret; - stub->args.ftruncate_cbk.op_errno = op_errno; - if (prebuf) - stub->args.ftruncate_cbk.prebuf = *prebuf; - if (postbuf) - stub->args.ftruncate_cbk.postbuf = *postbuf; + stub->args.ftruncate_cbk.fn = fn; + stub->args.ftruncate_cbk.op_ret = op_ret; + stub->args.ftruncate_cbk.op_errno = op_errno; + if (prebuf) + stub->args.ftruncate_cbk.prebuf = *prebuf; + if (postbuf) + stub->args.ftruncate_cbk.postbuf = *postbuf; out: - return stub; + return stub; } call_stub_t * fop_access_stub (call_frame_t *frame, - fop_access_t fn, - loc_t *loc, - int32_t mask) + fop_access_t fn, + loc_t *loc, + int32_t mask) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_ACCESS); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_ACCESS); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.access.fn = fn; - loc_copy (&stub->args.access.loc, loc); - stub->args.access.mask = mask; + stub->args.access.fn = fn; + loc_copy (&stub->args.access.loc, loc); + stub->args.access.mask = mask; out: - return stub; + return stub; } call_stub_t * fop_access_cbk_stub (call_frame_t *frame, - fop_access_cbk_t fn, - int32_t op_ret, - int32_t op_errno) + fop_access_cbk_t fn, + int32_t op_ret, + int32_t op_errno) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_ACCESS); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_ACCESS); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.access_cbk.fn = fn; - stub->args.access_cbk.op_ret = op_ret; - stub->args.access_cbk.op_errno = op_errno; + stub->args.access_cbk.fn = fn; + stub->args.access_cbk.op_ret = op_ret; + stub->args.access_cbk.op_errno = op_errno; out: - return stub; + return stub; } call_stub_t * fop_readlink_stub (call_frame_t *frame, - fop_readlink_t fn, - loc_t *loc, - size_t size) + fop_readlink_t fn, + loc_t *loc, + size_t size) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - - stub = stub_new (frame, 1, GF_FOP_READLINK); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub->args.readlink.fn = fn; - loc_copy (&stub->args.readlink.loc, loc); - stub->args.readlink.size = size; + stub = stub_new (frame, 1, GF_FOP_READLINK); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + + stub->args.readlink.fn = fn; + loc_copy (&stub->args.readlink.loc, loc); + stub->args.readlink.size = size; out: - return stub; + return stub; } call_stub_t * fop_readlink_cbk_stub (call_frame_t *frame, - fop_readlink_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - const char *path, + fop_readlink_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + const char *path, struct iatt *sbuf) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_READLINK); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_READLINK); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.readlink_cbk.fn = fn; - stub->args.readlink_cbk.op_ret = op_ret; - stub->args.readlink_cbk.op_errno = op_errno; - if (path) - stub->args.readlink_cbk.buf = gf_strdup (path); + stub->args.readlink_cbk.fn = fn; + stub->args.readlink_cbk.op_ret = op_ret; + stub->args.readlink_cbk.op_errno = op_errno; + if (path) + stub->args.readlink_cbk.buf = gf_strdup (path); if (sbuf) stub->args.readlink_cbk.sbuf = *sbuf; out: - return stub; + return stub; } call_stub_t * fop_mknod_stub (call_frame_t *frame, fop_mknod_t fn, - loc_t *loc, mode_t mode, dev_t rdev, dict_t *params) + loc_t *loc, mode_t mode, dev_t rdev, dict_t *params) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_MKNOD); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_MKNOD); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.mknod.fn = fn; - loc_copy (&stub->args.mknod.loc, loc); - stub->args.mknod.mode = mode; - stub->args.mknod.rdev = rdev; + stub->args.mknod.fn = fn; + loc_copy (&stub->args.mknod.loc, loc); + stub->args.mknod.mode = mode; + stub->args.mknod.rdev = rdev; if (params) stub->args.mknod.params = dict_ref (params); out: - return stub; + return stub; } call_stub_t * fop_mknod_cbk_stub (call_frame_t *frame, - fop_mknod_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - inode_t *inode, + fop_mknod_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + inode_t *inode, struct iatt *buf, struct iatt *preparent, struct iatt *postparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_MKNOD); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_MKNOD); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.mknod_cbk.fn = fn; - stub->args.mknod_cbk.op_ret = op_ret; - stub->args.mknod_cbk.op_errno = op_errno; - if (inode) - stub->args.mknod_cbk.inode = inode_ref (inode); - if (buf) - stub->args.mknod_cbk.buf = *buf; + stub->args.mknod_cbk.fn = fn; + stub->args.mknod_cbk.op_ret = op_ret; + stub->args.mknod_cbk.op_errno = op_errno; + if (inode) + stub->args.mknod_cbk.inode = inode_ref (inode); + if (buf) + stub->args.mknod_cbk.buf = *buf; if (preparent) stub->args.mknod_cbk.preparent = *preparent; if (postparent) stub->args.mknod_cbk.postparent = *postparent; out: - return stub; + return stub; } call_stub_t * fop_mkdir_stub (call_frame_t *frame, fop_mkdir_t fn, - loc_t *loc, mode_t mode, dict_t *params) + loc_t *loc, mode_t mode, dict_t *params) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_MKDIR); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_MKDIR); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.mkdir.fn = fn; - loc_copy (&stub->args.mkdir.loc, loc); - stub->args.mkdir.mode = mode; + stub->args.mkdir.fn = fn; + loc_copy (&stub->args.mkdir.loc, loc); + stub->args.mkdir.mode = mode; if (params) stub->args.mkdir.params = dict_ref (params); out: - return stub; + return stub; } call_stub_t * fop_mkdir_cbk_stub (call_frame_t *frame, - fop_mkdir_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - inode_t *inode, + fop_mkdir_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + inode_t *inode, struct iatt *buf, struct iatt *preparent, struct iatt *postparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_MKDIR); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_MKDIR); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.mkdir_cbk.fn = fn; - stub->args.mkdir_cbk.op_ret = op_ret; - stub->args.mkdir_cbk.op_errno = op_errno; - if (inode) - stub->args.mkdir_cbk.inode = inode_ref (inode); - if (buf) - stub->args.mkdir_cbk.buf = *buf; + stub->args.mkdir_cbk.fn = fn; + stub->args.mkdir_cbk.op_ret = op_ret; + stub->args.mkdir_cbk.op_errno = op_errno; + if (inode) + stub->args.mkdir_cbk.inode = inode_ref (inode); + if (buf) + stub->args.mkdir_cbk.buf = *buf; if (preparent) stub->args.mkdir_cbk.preparent = *preparent; if (postparent) stub->args.mkdir_cbk.postparent = *postparent; out: - return stub; + return stub; } call_stub_t * fop_unlink_stub (call_frame_t *frame, - fop_unlink_t fn, - loc_t *loc) + fop_unlink_t fn, + loc_t *loc) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_UNLINK); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_UNLINK); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.unlink.fn = fn; - loc_copy (&stub->args.unlink.loc, loc); + stub->args.unlink.fn = fn; + loc_copy (&stub->args.unlink.loc, loc); out: - return stub; + return stub; } call_stub_t * fop_unlink_cbk_stub (call_frame_t *frame, - fop_unlink_cbk_t fn, - int32_t op_ret, - int32_t op_errno, + fop_unlink_cbk_t fn, + int32_t op_ret, + int32_t op_errno, struct iatt *preparent, struct iatt *postparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_UNLINK); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_UNLINK); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.unlink_cbk.fn = fn; - stub->args.unlink_cbk.op_ret = op_ret; - stub->args.unlink_cbk.op_errno = op_errno; + stub->args.unlink_cbk.fn = fn; + stub->args.unlink_cbk.op_ret = op_ret; + stub->args.unlink_cbk.op_errno = op_errno; if (preparent) stub->args.unlink_cbk.preparent = *preparent; if (postparent) stub->args.unlink_cbk.postparent = *postparent; out: - return stub; + return stub; } call_stub_t * fop_rmdir_stub (call_frame_t *frame, fop_rmdir_t fn, - loc_t *loc, int flags) + loc_t *loc, int flags) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_RMDIR); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_RMDIR); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.rmdir.fn = fn; - loc_copy (&stub->args.rmdir.loc, loc); + stub->args.rmdir.fn = fn; + loc_copy (&stub->args.rmdir.loc, loc); stub->args.rmdir.flags = flags; out: - return stub; + return stub; } call_stub_t * fop_rmdir_cbk_stub (call_frame_t *frame, - fop_rmdir_cbk_t fn, - int32_t op_ret, - int32_t op_errno, + fop_rmdir_cbk_t fn, + int32_t op_ret, + int32_t op_errno, struct iatt *preparent, struct iatt *postparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_RMDIR); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_RMDIR); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.rmdir_cbk.fn = fn; - stub->args.rmdir_cbk.op_ret = op_ret; - stub->args.rmdir_cbk.op_errno = op_errno; + stub->args.rmdir_cbk.fn = fn; + stub->args.rmdir_cbk.op_ret = op_ret; + stub->args.rmdir_cbk.op_errno = op_errno; if (preparent) stub->args.rmdir_cbk.preparent = *preparent; if (postparent) stub->args.rmdir_cbk.postparent = *postparent; out: - return stub; + return stub; } call_stub_t * fop_symlink_stub (call_frame_t *frame, fop_symlink_t fn, - const char *linkname, loc_t *loc, dict_t *params) + const char *linkname, loc_t *loc, dict_t *params) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - GF_VALIDATE_OR_GOTO ("call-stub", linkname, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", linkname, out); - stub = stub_new (frame, 1, GF_FOP_SYMLINK); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_SYMLINK); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.symlink.fn = fn; - stub->args.symlink.linkname = gf_strdup (linkname); - loc_copy (&stub->args.symlink.loc, loc); + stub->args.symlink.fn = fn; + stub->args.symlink.linkname = gf_strdup (linkname); + loc_copy (&stub->args.symlink.loc, loc); if (params) stub->args.symlink.params = dict_ref (params); out: - return stub; + return stub; } call_stub_t * fop_symlink_cbk_stub (call_frame_t *frame, - fop_symlink_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - inode_t *inode, + fop_symlink_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + inode_t *inode, struct iatt *buf, struct iatt *preparent, struct iatt *postparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_SYMLINK); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_SYMLINK); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.symlink_cbk.fn = fn; - stub->args.symlink_cbk.op_ret = op_ret; - stub->args.symlink_cbk.op_errno = op_errno; - if (inode) - stub->args.symlink_cbk.inode = inode_ref (inode); - if (buf) - stub->args.symlink_cbk.buf = *buf; + stub->args.symlink_cbk.fn = fn; + stub->args.symlink_cbk.op_ret = op_ret; + stub->args.symlink_cbk.op_errno = op_errno; + if (inode) + stub->args.symlink_cbk.inode = inode_ref (inode); + if (buf) + stub->args.symlink_cbk.buf = *buf; if (preparent) stub->args.symlink_cbk.preparent = *preparent; if (postparent) stub->args.symlink_cbk.postparent = *postparent; out: - return stub; + return stub; } call_stub_t * fop_rename_stub (call_frame_t *frame, - fop_rename_t fn, - loc_t *oldloc, - loc_t *newloc) + fop_rename_t fn, + loc_t *oldloc, + loc_t *newloc) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", oldloc, out); - GF_VALIDATE_OR_GOTO ("call-stub", newloc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", oldloc, out); + GF_VALIDATE_OR_GOTO ("call-stub", newloc, out); - stub = stub_new (frame, 1, GF_FOP_RENAME); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_RENAME); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.rename.fn = fn; - loc_copy (&stub->args.rename.old, oldloc); - loc_copy (&stub->args.rename.new, newloc); + stub->args.rename.fn = fn; + loc_copy (&stub->args.rename.old, oldloc); + loc_copy (&stub->args.rename.new, newloc); out: - return stub; + return stub; } call_stub_t * fop_rename_cbk_stub (call_frame_t *frame, - fop_rename_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct iatt *buf, + fop_rename_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + struct iatt *buf, struct iatt *preoldparent, struct iatt *postoldparent, struct iatt *prenewparent, struct iatt *postnewparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_RENAME); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_RENAME); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.rename_cbk.fn = fn; - stub->args.rename_cbk.op_ret = op_ret; - stub->args.rename_cbk.op_errno = op_errno; - if (buf) - stub->args.rename_cbk.buf = *buf; + stub->args.rename_cbk.fn = fn; + stub->args.rename_cbk.op_ret = op_ret; + stub->args.rename_cbk.op_errno = op_errno; + if (buf) + stub->args.rename_cbk.buf = *buf; if (preoldparent) stub->args.rename_cbk.preoldparent = *preoldparent; if (postoldparent) @@ -709,333 +709,333 @@ fop_rename_cbk_stub (call_frame_t *frame, if (postnewparent) stub->args.rename_cbk.postnewparent = *postnewparent; out: - return stub; + return stub; } call_stub_t * fop_link_stub (call_frame_t *frame, - fop_link_t fn, - loc_t *oldloc, - loc_t *newloc) + fop_link_t fn, + loc_t *oldloc, + loc_t *newloc) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", oldloc, out); - GF_VALIDATE_OR_GOTO ("call-stub", newloc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", oldloc, out); + GF_VALIDATE_OR_GOTO ("call-stub", newloc, out); - stub = stub_new (frame, 1, GF_FOP_LINK); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_LINK); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.link.fn = fn; - loc_copy (&stub->args.link.oldloc, oldloc); - loc_copy (&stub->args.link.newloc, newloc); + stub->args.link.fn = fn; + loc_copy (&stub->args.link.oldloc, oldloc); + loc_copy (&stub->args.link.newloc, newloc); out: - return stub; + return stub; } call_stub_t * fop_link_cbk_stub (call_frame_t *frame, - fop_link_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - inode_t *inode, + fop_link_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + inode_t *inode, struct iatt *buf, struct iatt *preparent, struct iatt *postparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_LINK); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_LINK); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.link_cbk.fn = fn; - stub->args.link_cbk.op_ret = op_ret; - stub->args.link_cbk.op_errno = op_errno; - if (inode) - stub->args.link_cbk.inode = inode_ref (inode); - if (buf) - stub->args.link_cbk.buf = *buf; + stub->args.link_cbk.fn = fn; + stub->args.link_cbk.op_ret = op_ret; + stub->args.link_cbk.op_errno = op_errno; + if (inode) + stub->args.link_cbk.inode = inode_ref (inode); + if (buf) + stub->args.link_cbk.buf = *buf; if (preparent) stub->args.link_cbk.preparent = *preparent; if (postparent) stub->args.link_cbk.postparent = *postparent; out: - return stub; + return stub; } call_stub_t * fop_create_stub (call_frame_t *frame, fop_create_t fn, - loc_t *loc, int32_t flags, mode_t mode, + loc_t *loc, int32_t flags, mode_t mode, fd_t *fd, dict_t *params) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_CREATE); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_CREATE); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.create.fn = fn; - loc_copy (&stub->args.create.loc, loc); - stub->args.create.flags = flags; - stub->args.create.mode = mode; - if (fd) - stub->args.create.fd = fd_ref (fd); + stub->args.create.fn = fn; + loc_copy (&stub->args.create.loc, loc); + stub->args.create.flags = flags; + stub->args.create.mode = mode; + if (fd) + stub->args.create.fd = fd_ref (fd); if (params) stub->args.create.params = dict_ref (params); out: - return stub; + return stub; } call_stub_t * fop_create_cbk_stub (call_frame_t *frame, - fop_create_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - fd_t *fd, - inode_t *inode, - struct iatt *buf, + fop_create_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + fd_t *fd, + inode_t *inode, + struct iatt *buf, struct iatt *preparent, struct iatt *postparent) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_CREATE); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_CREATE); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.create_cbk.fn = fn; - stub->args.create_cbk.op_ret = op_ret; - stub->args.create_cbk.op_errno = op_errno; - if (fd) - stub->args.create_cbk.fd = fd_ref (fd); - if (inode) - stub->args.create_cbk.inode = inode_ref (inode); - if (buf) - stub->args.create_cbk.buf = *buf; + stub->args.create_cbk.fn = fn; + stub->args.create_cbk.op_ret = op_ret; + stub->args.create_cbk.op_errno = op_errno; + if (fd) + stub->args.create_cbk.fd = fd_ref (fd); + if (inode) + stub->args.create_cbk.inode = inode_ref (inode); + if (buf) + stub->args.create_cbk.buf = *buf; if (preparent) stub->args.create_cbk.preparent = *preparent; if (postparent) stub->args.create_cbk.postparent = *postparent; out: - return stub; + return stub; } call_stub_t * fop_open_stub (call_frame_t *frame, - fop_open_t fn, - loc_t *loc, - int32_t flags, fd_t *fd, + fop_open_t fn, + loc_t *loc, + int32_t flags, fd_t *fd, int32_t wbflags) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - stub = stub_new (frame, 1, GF_FOP_OPEN); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_OPEN); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.open.fn = fn; - loc_copy (&stub->args.open.loc, loc); - stub->args.open.flags = flags; + stub->args.open.fn = fn; + loc_copy (&stub->args.open.loc, loc); + stub->args.open.flags = flags; stub->args.open.wbflags = wbflags; - if (fd) - stub->args.open.fd = fd_ref (fd); + if (fd) + stub->args.open.fd = fd_ref (fd); out: - return stub; + return stub; } call_stub_t * fop_open_cbk_stub (call_frame_t *frame, - fop_open_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - fd_t *fd) + fop_open_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + fd_t *fd) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_OPEN); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_OPEN); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.open_cbk.fn = fn; - stub->args.open_cbk.op_ret = op_ret; - stub->args.open_cbk.op_errno = op_errno; - if (fd) - stub->args.open_cbk.fd = fd_ref (fd); + stub->args.open_cbk.fn = fn; + stub->args.open_cbk.op_ret = op_ret; + stub->args.open_cbk.op_errno = op_errno; + if (fd) + stub->args.open_cbk.fd = fd_ref (fd); out: - return stub; + return stub; } call_stub_t * fop_readv_stub (call_frame_t *frame, - fop_readv_t fn, - fd_t *fd, - size_t size, - off_t off) + fop_readv_t fn, + fd_t *fd, + size_t size, + off_t off) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 1, GF_FOP_READ); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_READ); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.readv.fn = fn; - if (fd) - stub->args.readv.fd = fd_ref (fd); - stub->args.readv.size = size; - stub->args.readv.off = off; + stub->args.readv.fn = fn; + if (fd) + stub->args.readv.fd = fd_ref (fd); + stub->args.readv.size = size; + stub->args.readv.off = off; out: - return stub; + return stub; } call_stub_t * fop_readv_cbk_stub (call_frame_t *frame, - fop_readv_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct iovec *vector, - int32_t count, - struct iatt *stbuf, + fop_readv_cbk_t fn, + int32_t op_ret, + int32_t op_errno, + struct iovec *vector, + int32_t count, + struct iatt *stbuf, struct iobref *iobref) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_READ); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 0, GF_FOP_READ); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.readv_cbk.fn = fn; - stub->args.readv_cbk.op_ret = op_ret; - stub->args.readv_cbk.op_errno = op_errno; - if (op_ret >= 0) { - stub->args.readv_cbk.vector = iov_dup (vector, count); - stub->args.readv_cbk.count = count; - stub->args.readv_cbk.stbuf = *stbuf; - stub->args.readv_cbk.iobref = iobref_ref (iobref); - } + stub->args.readv_cbk.fn = fn; + stub->args.readv_cbk.op_ret = op_ret; + stub->args.readv_cbk.op_errno = op_errno; + if (op_ret >= 0) { + stub->args.readv_cbk.vector = iov_dup (vector, count); + stub->args.readv_cbk.count = count; + stub->args.readv_cbk.stbuf = *stbuf; + stub->args.readv_cbk.iobref = iobref_ref (iobref); + } out: - return stub; + return stub; } call_stub_t * fop_writev_stub (call_frame_t *frame, - fop_writev_t fn, - fd_t *fd, - struct iovec *vector, - int32_t count, - off_t off, + fop_writev_t fn, + fd_t *fd, + struct iovec *vector, + int32_t count, + off_t off, struct iobref *iobref) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", vector, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", vector, out); - stub = stub_new (frame, 1, GF_FOP_WRITE); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); + stub = stub_new (frame, 1, GF_FOP_WRITE); + GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - stub->args.writev.fn = fn; - if (fd) - stub->args.writev.fd = fd_ref (fd); - stub->args.writev.vector = iov_dup (vector, count); - stub->args.writev.count = count; - stub->args.writev.off = off; + stub->args.writev.fn = fn; + if (fd) + stub->args.writev.fd = fd_ref (fd); + stub->args.writev.vector = iov_dup (vector, count); + stub->args.writev.count = count; + stub->args.writev.off = off; stub->args.writev.iobref = iobref_ref (iobref); out: - return stub; + return stub; } call_stub_t * fop_writev_cbk_stub (call_frame_t *frame, - fop_writev_cbk_t fn, - int32_t op_ret, - int32_t op_errno, + fop_writev_cbk_t fn, + int32_t op_ret, + int32_t op_errno, struct iatt *prebuf, - struct iatt *postbuf) + struct iatt *postbuf) { - call_stub_t *stub = NULL; + call_stub_t *stub = NULL; - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); + GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - stub = stub_new (frame, 0, GF_FOP_WRITE); |
