From dfaf76cffe37183c1b8072961b085f705c1c978f Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Thu, 21 Aug 2014 17:27:17 +0530 Subject: cluster/afr: Propagate EIO on inode's type mismatch Backport of: http://review.gluster.org/8574, and http://review.gluster.org/8586 Original author of the test script: Pranith Kumar K Change-Id: I0c32bdd8e666f8175c0a8fbf940934e6ce469931 BUG: 1136830 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/8706 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-self-heal-common.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c') diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index 1c3d4a5dc86..9a88a7d9e5c 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -312,8 +312,7 @@ afr_selfheal_extract_xattr (xlator_t *this, struct afr_reply *replies, */ int -afr_selfheal_find_direction (call_frame_t *frame, xlator_t *this, - struct afr_reply *replies, +afr_selfheal_find_direction (xlator_t *this, struct afr_reply *replies, afr_transaction_type type, unsigned char *locked_on, unsigned char *sources, unsigned char *sinks) { @@ -415,7 +414,7 @@ afr_selfheal_discover_cbk (call_frame_t *frame, void *cookie, xlator_t *this, inode_t * afr_selfheal_unlocked_lookup_on (call_frame_t *frame, inode_t *parent, const char *name, struct afr_reply *replies, - unsigned char *lookup_on) + unsigned char *lookup_on, dict_t *xattr) { loc_t loc = {0, }; dict_t *xattr_req = NULL; @@ -430,6 +429,9 @@ afr_selfheal_unlocked_lookup_on (call_frame_t *frame, inode_t *parent, if (!xattr_req) return NULL; + if (xattr) + dict_copy (xattr, xattr_req); + if (afr_xattr_req_prepare (frame->this, xattr_req) != 0) { dict_destroy (xattr_req); return NULL; @@ -457,7 +459,6 @@ afr_selfheal_unlocked_lookup_on (call_frame_t *frame, inode_t *parent, return inode; } - int afr_selfheal_unlocked_discover_on (call_frame_t *frame, inode_t *inode, uuid_t gfid, struct afr_reply *replies, -- cgit