Skip to content

fix flistd cleanup #41

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

fix flistd cleanup #41

wants to merge 4 commits into from

Conversation

Eslam-Nawara
Copy link
Contributor

Description

force unmount and remove in flist clean up if the path is not mountpoint but the module can not delete it

Related Issues

threefoldtech/zos#2581

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstring

log.Warn().Err(err).Msgf("normal unmount failed for %s, trying lazy unmount", path)

// try lazy unmount
err = f.system.Unmount(path, syscall.MNT_DETACH)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not force unmount that is lazy unmount which is something diff from the method name
so I suggest u try to unmount if not try force unmount if u really want to force unmount
err := syscall.Unmount("/mnt/my-mount", syscall.MNT_FORCE)
or change method name to reflect u r doing lazy unmount but sure this needs some testing to check if force unmount will slove it or not

Copy link
Contributor Author

Choose a reason for hiding this comment

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

force umount is not supported for the used fs, the force will be ignored, so the safe solution is to use lazy mount, the function name meant to reflect that we forcibly do the clean up, will updated the name to reflect that

@Eslam-Nawara Eslam-Nawara requested a review from ashraffouda July 13, 2025 11:52
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