Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • uapi
  • linux
  • mount.h
Find file BlameHistoryPermalink
  • Miklos Szeredi's avatar
    add statmount(2) syscall · 46eae99e
    Miklos Szeredi authored Oct 25, 2023
    Add a way to query attributes of a single mount instead of having to parse
    the complete /proc/$PID/mountinfo, which might be huge.
    
    Lookup the mount the new 64bit mount ID.  If a mount needs to be queried
    based on path, then statx(2) can be used to first query the mount ID
    belonging to the path.
    
    Design is based on a suggestion by Linus:
    
      "So I'd suggest something that is very much like "statfsat()", which gets
       a buffer and a length, and returns an extended "struct statfs" *AND*
       just a string description at the end."
    
    The interface closely mimics that of statx.
    
    Handle ASCII attributes by appending after the end of the structure (as per
    above suggestion).  Pointers to strings are stored in u64 members to make
    the structure the same regardless of pointer size.  Strings are nul
    terminated.
    
    Link: https://lore.kernel.org/all/CAHk-=wh5YifP7hzKSbwJj94+DZ2czjrZsczy6GBimiogZws=rg@mail.gmail.com/
    
    
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    Link: https://lore.kernel.org/r/20231025140205.3586473-5-mszeredi@redhat.com
    
    
    Reviewed-by: default avatarIan Kent <raven@themaw.net>
    [Christian Brauner <brauner@kernel.org>: various minor changes]
    Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
    46eae99e
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7