Skip to content
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

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

rafikc30
Copy link
Member

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

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]>
@rafikc30
Copy link
Member Author

/run regression

int pending = 0;
int metadata_idx = 0;
int idx = -1;
int ret = 0;
int i = 0;

iatt = &lookup_replies[source].poststat;
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

@mohit84 mohit84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@mohit84 mohit84 requested a review from karthik-us March 28, 2023 05:54
rafikc30 added a commit to rafikc30/glusterfs that referenced this pull request Mar 28, 2023
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]>
@mohit84
Copy link
Contributor

mohit84 commented Mar 29, 2023

/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) {
Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link

stale bot commented Dec 15, 2023

Thank you for your contributions.
Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity.
It will be closed in 2 weeks if no one responds with a comment here.

@stale stale bot added the wontfix Managed by stale[bot] label Dec 15, 2023
Copy link

stale bot commented Mar 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Managed by stale[bot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symlinks are not healed (during entry creation) if it has a pending metadata heal
4 participants