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

pkg/rm: attempt os.RemoveAll() first #1581

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

giuseppe
Copy link
Member

the mount.RecursiveUnmount() call can be expensive, since it needs to parse the mount table to reconstruct the mount tree.

Attempt the simple case first, and do the more expensive removal only if necessary.

@giuseppe
Copy link
Member Author

@kolyshkin PTAL

@rhatdan
Copy link
Member

rhatdan commented Apr 27, 2023

LGTM

@giuseppe giuseppe force-pushed the ensure-rm-all-no-rec-umount branch from c57dff9 to 61c8d60 Compare April 27, 2023 20:13
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the ensure-rm-all-no-rec-umount branch from 61c8d60 to 606b958 Compare April 27, 2023 20:24
@giuseppe
Copy link
Member Author

rebased on top of #1585

the mount.RecursiveUnmount() call can be expensive, since it needs to
parse the mount table to reconstruct the mount tree.

Attempt the simple case first, and do the more expensive removal only
if necessary.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the ensure-rm-all-no-rec-umount branch from 606b958 to 6b7e512 Compare April 27, 2023 20:29
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

I can't think of why anyone else (including me) haven't done this yet.

LGTM

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.

None yet

3 participants