From 6588204568ab73bf8456ca3b2eccf2ae1182fb95 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 23 Jan 2017 14:58:45 +0530 Subject: cluster/afr: Perform new entry mark before creating new entry There is a chance for the source brick to go down just after the new entry is created and before source brick is marked with necessary pending markers. If after this any I/O happens then new entry will become source and reverse heal will happen. To prevent this mark the pending xattrs before creating the new entry. BUG: 1417466 Change-Id: I233b87e694d32e5d734df5a83b4d2ca711c17503 Signed-off-by: Pranith Kumar K Reviewed-on: https://review.gluster.org/16474 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Ravishankar N Reviewed-by: Krutika Dhananjay --- xlators/cluster/afr/src/afr-self-heal.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xlators/cluster/afr/src/afr-self-heal.h') diff --git a/xlators/cluster/afr/src/afr-self-heal.h b/xlators/cluster/afr/src/afr-self-heal.h index a33905033cc..2b3a87ec824 100644 --- a/xlators/cluster/afr/src/afr-self-heal.h +++ b/xlators/cluster/afr/src/afr-self-heal.h @@ -174,10 +174,10 @@ afr_selfheal_undo_pending (call_frame_t *frame, xlator_t *this, inode_t *inode, unsigned char *locked_on); int -afr_selfheal_recreate_entry (xlator_t *this, int dst, int source, inode_t *dir, - const char *name, inode_t *inode, - struct afr_reply *replies, - unsigned char *newentry); +afr_selfheal_recreate_entry (call_frame_t *frame, int dst, int source, + unsigned char *sources, + inode_t *dir, const char *name, inode_t *inode, + struct afr_reply *replies); int afr_selfheal_post_op (call_frame_t *frame, xlator_t *this, inode_t *inode, -- cgit