summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-common.h
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-07-25 09:56:58 +0530
committerAnand Avati <avati@redhat.com>2012-07-25 15:02:39 -0700
commit75ee490213b7f7673970ef80dee3bcc567848c26 (patch)
treeae3680385a4fec07cd8b6bb5f1551cbfb6c91c9b /xlators/cluster/afr/src/afr-self-heal-common.h
parent787d52d8e8bf415e48fa41ff9c7fef4693804903 (diff)
cluster/afr: Perform data self-heal for non regular files
RCA: Data self-heal for non regular files open the files and then proceeds using that fd. This approach does not work for symlinks because open on symlink opens the file resolved by it. Fix: If the file is not a regular file then perform self-heal using loc. It needs to get 'big' lock and then perform lookup to get changelog then erase data part of chagelog, then unlock. Test cases: Automated at https://github.com/pranithk/gluster-tests/blob/master/afr/special-file-self-heal-test.sh Change-Id: I924a922f5135872efe2cccf2e712ada082c5689f BUG: 811317 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3724 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.h')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.h b/xlators/cluster/afr/src/afr-self-heal-common.h
index cea554670b5..6eabd1766c0 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.h
+++ b/xlators/cluster/afr/src/afr-self-heal-common.h
@@ -125,4 +125,8 @@ afr_children_intersection_get (int32_t *set1, int32_t *set2,
int
afr_get_no_xattr_dir_read_child (xlator_t *this, int32_t *success_children,
struct iatt *bufs);
+int
+afr_sh_erase_pending (call_frame_t *frame, xlator_t *this,
+ afr_transaction_type type, afr_fxattrop_cbk_t cbk,
+ int (*finish)(call_frame_t *frame, xlator_t *this));
#endif /* __AFR_SELF_HEAL_COMMON_H__ */