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

Factor out a new top-level mount module. #763

Merged
merged 8 commits into from
Aug 2, 2023
Merged

Conversation

sunfishcode
Copy link
Member

Create rustix::mount, and move the mount-related and fsopen-related functions into it, adding deprecated aliases in rustix::fs for compatibility.

This also renames several functions which are all specialized forms of the mount system call, so I renamed them to have mount at the beginning. It also fixes the collision with the real move_mount system call.

  • remount to mount_remount
  • bind_mount to mount_bind
  • recursive_bind_mount to mount_recursive_bind
  • change_mount to mount_change
  • move_mount to mount_move

And, it adds documentation links to a new repository I set up to host formatted versions of the draft manual pages that were posted.

@yujincheng08 @SUPERCILEX

@sunfishcode sunfishcode force-pushed the sunfishcode/mount-api branch from c7c4362 to 58d17fb Compare July 31, 2023 22:59
@yujincheng08 yujincheng08 mentioned this pull request Aug 1, 2023
6 tasks
Create `rustix::mount`, and move the mount-related and fsopen-related
functions into it, adding deprecated aliases in `rustix::fs` for
compatibility.

This also renames several functions which are all specialized forms
of the `mount` system call, so I renamed them to have `mount` at the
beginning. It also fixes the collision with the real `move_mount`
system call.

 - `remount` to `mount_remount`
 - `bind_mount` to `mount_bind`
 - `recursive_bind_mount` to `mount_recursive_bind`
 - `change_mount` to `mount_change`
 - `move_mount` to `mount_move`

And, it adds documentation links to a [new repository] I set up to
host formatted versions of the draft manual pages that were posted.

[new repository]: https://github.com/sunfishcode/linux-mount-api-documentation
@sunfishcode sunfishcode force-pushed the sunfishcode/mount-api branch from 05420f2 to 54ff6cc Compare August 2, 2023 13:31
@sunfishcode sunfishcode merged commit f39851f into main Aug 2, 2023
@sunfishcode sunfishcode deleted the sunfishcode/mount-api branch August 2, 2023 14:12
@SUPERCILEX
Copy link
Contributor

Small nit: since we're renaming things, I wonder if mount_bind_recursive is more consistent? It would follow the prefix pattern.

Looks great otherwise! (Based on the PR description, won't have time to look at code)

@sunfishcode sunfishcode mentioned this pull request Aug 2, 2023
21 tasks
@sunfishcode
Copy link
Member Author

Thanks! The documentation calls it a "recursive bind mount" so the answer to "what kind of mount is it?" is "a recursive bind one", so I went with mount_recursive_bind for now, though I also made a note to revisit this.

@SUPERCILEX
Copy link
Contributor

Sounds good!

sunfishcode added a commit that referenced this pull request Jan 22, 2025
See [this comment] for details.

[this comment]: #763 (comment)
sunfishcode added a commit that referenced this pull request Jan 22, 2025
See [this comment] for details.

[this comment]: #763 (comment)
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