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

Fix timeout caused by dead mount points #129

Merged
merged 3 commits into from
May 5, 2023

Conversation

derekbit
Copy link
Member

@derekbit derekbit commented May 4, 2023

derekbit added 2 commits May 4, 2023 21:30
GetMnt() iterates and gets information of all mount points in the mount table.
If there is any dead mount point, the iteration will hang for a while,
so the caller (backup ls) will run into a timeout error in the end.

Longhorn 5856

Signed-off-by: Derek Su <derek.su@suse.com>
The cleanup leads to the mount timeout if there is any dead mount point.

Longhorn 5856

Signed-off-by: Derek Su <derek.su@suse.com>
Longhorn 5856

Signed-off-by: Derek Su <derek.su@suse.com>
Comment on lines +52 to +62
func fstypeToKind(fstype int64) (string, error) {
switch fstype {
case unix.NFS_SUPER_MAGIC:
return "nfs", nil
case unix.CIFS_SUPER_MAGIC:
return "cifs", nil
default:
return "", fmt.Errorf("unknown fstype %v", fstype)
}
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Remove case unix.CIFS_SUPER_MAGIC: for v1.4.x

Copy link
Member

@innobead innobead left a comment

Choose a reason for hiding this comment

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

LGTM

@innobead innobead merged commit a1d4a7b into longhorn:master May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants