Skip to content

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
@Eslam-Nawara Eslam-Nawara merged commit 708725d into main Jul 31, 2025
1 check passed
@Eslam-Nawara Eslam-Nawara deleted the fix-flistd-cleanup branch July 31, 2025 08:54
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.

3 participants