linux-stable/include/uapi
Tomohiro Misono 42e4b520c8 btrfs: Add unprivileged ioctl which returns subvolume's ROOT_REF
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: Qu Wenruo <wqu@suse.com>
Reviewed-by: Gu Jinxiang <gujx@cn.fujitsu.com>
Tested-by: Gu Jinxiang <gujx@cn.fujitsu.com>
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
[ style fixes and struct item renames ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-05-31 11:35:23 +02:00
..
asm-generic Merge branch 'parisc-4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2018-04-12 17:07:04 -07:00
drm Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
linux btrfs: Add unprivileged ioctl which returns subvolume's ROOT_REF 2018-05-31 11:35:23 +02:00
misc ocxl: Add get_metadata IOCTL to share OCXL information to userspace 2018-03-02 13:02:14 +11:00
mtd
rdma uapi: Fix SPDX tags for files referring to the 'OpenIB.org' license 2018-04-23 11:10:33 -04:00
scsi
sound ASoC: soc-generic-dmaengine-pcm: Fix sparse warnings 2018-02-26 11:05:12 +00:00
video
xen