diff options
author | karthik-us <ksubrahm@redhat.com> | 2016-05-05 12:42:35 +0530 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2016-05-31 08:55:57 -0700 |
commit | 03880f81dad9fd2a3a07c56a3cfbb994d44819b7 (patch) | |
tree | 334f7f3752dee2163f2bf6bff8df2fa8b32588da /xlators/features/read-only/src/worm-helper.h | |
parent | 1126ebcf667771267a47ea9749ed5f30a76d0d60 (diff) |
features/worm: updating function names & unwinding FOPs with op_errno
- Added gf_worm prefix to some of the functions in worm-helper files so that
they do not clash with other functions
- Made the functions in worm.c static
- Unwinding the FOPs with op_errno instead of using different unwind statements
- Removed the multiple goto labels (wind & unwind)
Change-Id: I3a2f114061aae4b422df54e91c4b3f702af5d0b0
BUG: 1333263
Signed-off-by: karthik-us <ksubrahm@redhat.com>
Reviewed-on: http://review.gluster.org/14222
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Joseph Fernandes
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/features/read-only/src/worm-helper.h')
-rw-r--r-- | xlators/features/read-only/src/worm-helper.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/xlators/features/read-only/src/worm-helper.h b/xlators/features/read-only/src/worm-helper.h index a06a1d38063..745df8294c3 100644 --- a/xlators/features/read-only/src/worm-helper.h +++ b/xlators/features/read-only/src/worm-helper.h @@ -8,7 +8,7 @@ cases as published by the Free Software Foundation. */ -gf_boolean_t is_write_disabled (struct iatt *stbuf); +gf_boolean_t gf_worm_write_disabled (struct iatt *stbuf); int32_t worm_init_state (xlator_t *this, gf_boolean_t fop_with_fd, void *file_ptr); @@ -20,17 +20,18 @@ int32_t worm_set_state (xlator_t *this, gf_boolean_t fop_with_fd, int32_t worm_get_state (xlator_t *this, gf_boolean_t fop_with_fd, void *file_ptr, worm_reten_state_t *reten_state); -void state_lookup (xlator_t *this, gf_boolean_t fop_with_fd, void *file_ptr, - worm_reten_state_t *reten_state); +void gf_worm_state_lookup (xlator_t *this, gf_boolean_t fop_with_fd, + void *file_ptr, worm_reten_state_t *reten_state, + struct iatt *stbuf); -void serialize_state (worm_reten_state_t *reten_state, char *val); +void gf_worm_serialize_state (worm_reten_state_t *reten_state, char *val); -void deserialize_state (char *val, worm_reten_state_t *reten_state); +void gf_worm_deserialize_state (char *val, worm_reten_state_t *reten_state); -int32_t set_xattr (xlator_t *this, worm_reten_state_t *reten_state, - gf_boolean_t fop_with_fd, void *file_ptr); +int32_t gf_worm_set_xattr (xlator_t *this, worm_reten_state_t *reten_state, + gf_boolean_t fop_with_fd, void *file_ptr); -int32_t state_transition (xlator_t *this, gf_boolean_t fop_with_fd, - void *file_ptr, glusterfs_fop_t op, int *ret_val); +int gf_worm_state_transition (xlator_t *this, gf_boolean_t fop_with_fd, + void *file_ptr, glusterfs_fop_t op); int32_t is_wormfile (xlator_t *this, gf_boolean_t fop_with_fd, void *file_ptr); |