Sitelet https://github.com/moby/sys/issues/25
Skip to content

Implement Mounted() optimization using openat2(RESOLVE_NO_XDEV) #25

Description

@kolyshkin

Currently, Mounted() have to consult mountinfo to figure out if the argument is a mount point.

This mountinfo parsing can be avoided by doing two stat() calls and comparing dev_t. Unfortunately, it is not working for bind mounts.

Now, with openat2(RESOLVE_NO_XDEV), we might be able to implement a trick to do a similar check for bind mounts, thus eliminating the need to parse mountinfo entirely.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions