-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shd/symlink: soft links entry recreate fails #4065
base: devel
Are you sure you want to change the base?
Conversation
While an entry heal is on going, if there is a pending metadata set on the source dentry, then the recreation of soft link will fail to create on the destination. This patch introduce a new flag and avoid overloading the newentry mark flag Change-Id: I862ab8d4318746ef2b15823ef5ad2272bff8aed7 fixes: gluster#4064 Signed-off-by: Mohammed Rafi KC <[email protected]>
/run regression |
int pending = 0; | ||
int metadata_idx = 0; | ||
int idx = -1; | ||
int ret = 0; | ||
int i = 0; | ||
|
||
iatt = &lookup_replies[source].poststat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable assignment after validating source value at line 198.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not fixed yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM +1
While an entry heal is on going, if there is a pending metadata set on the source dentry, then the recreation of soft link will fail to create on the destination. This patch introduce a new flag and avoid overloading the newentry mark flag Change-Id: I862ab8d4318746ef2b15823ef5ad2272bff8aed7 Fixes: gluster#4065 Signed-off-by: Mohammed Rafi KC <[email protected]>
/run regression |
@@ -230,12 +234,25 @@ afr_new_entry_mark_status(call_frame_t *frame, loc_t *loc, | |||
goto lookup; | |||
} | |||
} | |||
if (iatt->ia_type == IA_IFLNK && dst_hardlink) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this conditions holds true, I think we can directly goto lookup from here too, as the steps look similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a slight difference. Here even if the entry doesn't exist, we want to return zero to skip the new marker. On the other hand on the lookup field, if the entry is not there, then we have to do the new entry marker.
Please correct me if I'm wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xhernandez Can you please check once and merge if you don't have any concerns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems ok, but I'm not very familiarized with all the details of AFR's self-heal code. It would be better that @pranithk reviewed it.
Thank you for your contributions. |
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it. |
While an entry heal is on going, if there is a pending metadata set on the source dentry,
then the recreation of soft link will fail to create on the destination.
This patch introduces a new flag and avoid overloading the newentry mark flag
Change-Id: I862ab8d4318746ef2b15823ef5ad2272bff8aed7
fixes: #4064