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
You need to sign in or sign up before continuing.
  • linux
  • include
  • uapi
  • linux
  • btrfs.h
Find file BlameHistoryPermalink
  • Tomohiro Misono's avatar
    btrfs: Add unprivileged ioctl which returns subvolume's ROOT_REF · 42e4b520
    Tomohiro Misono authored May 21, 2018
    
    
    Add unprivileged ioctl BTRFS_IOC_GET_SUBVOL_ROOTREF which returns
    ROOT_REF information of the subvolume containing this inode except the
    subvolume name (this is because to prevent potential name leak). The
    subvolume name will be gained by user version of ino_lookup ioctl
    (BTRFS_IOC_INO_LOOKUP_USER) which also performs permission check.
    
    The min id of root ref's subvolume to be searched is specified by
    @min_id in struct btrfs_ioctl_get_subvol_rootref_args. After the search
    ends, @min_id is set to the last searched root ref's subvolid + 1. Also,
    if there are more root refs than BTRFS_MAX_ROOTREF_BUFFER_NUM,
    -EOVERFLOW is returned. Therefore the caller can just call this ioctl
    again without changing the argument to continue search.
    
    Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarGu Jinxiang <gujx@cn.fujitsu.com>
    Tested-by: default avatarGu Jinxiang <gujx@cn.fujitsu.com>
    Signed-off-by: default avatarTomohiro Misono <misono.tomohiro@jp.fujitsu.com>
    [ style fixes and struct item renames ]
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    42e4b520
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7