From 75ee490213b7f7673970ef80dee3bcc567848c26 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 25 Jul 2012 09:56:58 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/3724 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-self-heal-common.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/cluster/afr/src/afr-self-heal-common.h') 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__ */ -- cgit