Conversation
bbcf7d2 to
3f80f3c
Compare
amarts
commented
Sep 22, 2020
libglusterfs/src/gen-defaults.py
Outdated
| return 0; | ||
| gf_return_t ret; | ||
| ret.op_ret = -1; | ||
| STACK_UNWIND_STRICT (@NAME@, frame, ret, op_errno, @ERROR_ARGS@); |
| #define IS_ERROR(ret) (((ret).op_ret) < 0) | ||
| #define IS_SUCCESS(ret) (((ret).op_ret) >= 0) | ||
| #define GET_RET(ret) ((ret).op_ret) | ||
| #define SET_RET(ret, val) ((ret).op_ret = val) |
libglusterfs/src/glusterfs/syncop.h
Outdated
| \ | ||
| if (!frame) { \ | ||
| stb->op_ret = -1; \ | ||
| stb->op_ret.op_ret = -1; \ |
| GF_XLATOR_BACKEND = 125, | ||
| GF_XLATOR_EXTERNAL = 126, | ||
| GF_XLATOR_MAXVALUE = 127, | ||
| }; |
libglusterfs/src/inode.c
Outdated
| op_ret = inode_ctx_get(inode, this, &need_lookup); | ||
| if (op_ret == -1) { | ||
| op_ret.op_ret = inode_ctx_get(inode, this, &need_lookup); | ||
| if (IS_ERROR(op_ret)) { |
| */ | ||
| AFR_STACK_UNWIND(setxattr, frame, 0, 0, NULL); | ||
| gf_return_t op_ret = {0}; | ||
| AFR_STACK_UNWIND(setxattr, frame, op_ret, 0, NULL); |
| gf_msg_debug(this->name, 0, "we're done locking"); | ||
|
|
||
| int_lock->lock_op_ret = 0; | ||
| SET_RET(int_lock->lock_op_ret, 0); |
| &local->stbuf, &local->preparent, | ||
| &local->postparent, local->xattr); | ||
| SET_RET(op_ret, 0); | ||
| dht_lookup_linkfile_create_cbk( |
xlators/cluster/dht/src/dht-common.c
Outdated
| @@ -8760,17 +8801,19 @@ dht_create_finish(call_frame_t *frame, xlator_t *this, int op_ret, | |||
| DHT_STACK_DESTROY(lock_frame); | |||
| } | |||
|
|
|||
| if (op_ret == 0) | |||
| if (ret >= 0) | |||
xlators/cluster/dht/src/dht-rename.c
Outdated
| } | ||
| } | ||
| if (local->ret_cache[conf->subvolume_cnt]) { | ||
| if (IS_SUCCESS(local->ret_cache[conf->subvolume_cnt])) { |
* return signature of all 'fops' callback changed to `gf_return_t`. * provide IS_ERROR()/IS_SUCCESS() macros to check only this type of argument. * provide 2 global variables `gf_success` and `gf_error` introduced, which can used instead of -1 and 0 return used largely today. Change-Id: Ib91216afaa89d7e4509757b50dd8a7d60a6bf0a9 Updates: #280 Signed-off-by: Amar Tumballi <amar@kadalu.io>
3f80f3c to
30c49d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
return signature of all 'fops' callback changed to
gf_return_t.provide IS_ERROR()/IS_SUCCESS() macros to check only this type of argument.
provide 2 global variables
gf_successandgf_errorintroduced, whichcan used instead of -1 and 0 return used largely today.
Change-Id: Ib91216afaa89d7e4509757b50dd8a7d60a6bf0a9
Updates: #280
Signed-off-by: Amar Tumballi amar@kadalu.io