* [PATCH v3 0/2] New qgroup creation / removal ioctl
@ 2017-07-14 15:09 Sargun Dhillon
0 siblings, 0 replies; only message in thread
From: Sargun Dhillon @ 2017-07-14 15:09 UTC (permalink / raw)
To: linux-btrfs
This patch introduces two new ioctls for creating, and removing qgroups.
These ioctls have a new args structure that allows passing flags, and
some reserved fields for future expansion. The ioctls prevent some
operations around level-0 qgroups as well.
The create operation prevents the creation of level-0 qgroups for
subvolumes that do not exist. The delete operations prevents the
deletion of level-0 qgroups that reference active volumes.
There are two different ioctl for creation, and deletion to enable
filtering of the ioctls via tools like seccomp-bpf. Currently, there
is one "swiss-army" ioctl that's multiplexed for creation, and
deletion, and you need to be able to dereference user memory to determine
whether or not it's a destructive operation -- something that cannot
be done via seccomp nor LSMs.
Changes since v2:
* Use a common datastructure for removal and creation
* Remove deprecation message for old API
Changes since v1:
* Remove creation of level-0 qgroups without subvol
Sargun Dhillon (2):
btrfs: Fail on removing qgroup if del_qgroup_item fails
btrfs: Add new ioctl uapis for qgroup creation / removal
fs/btrfs/ioctl.c | 100 ++++++++++++++++++++++++++++++++++++++++++++-
fs/btrfs/qgroup.c | 79 ++++++++++++++++++++++++++++++++---
fs/btrfs/qgroup.h | 6 ++-
include/uapi/linux/btrfs.h | 16 ++++++++
4 files changed, 192 insertions(+), 9 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-14 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14 15:09 [PATCH v3 0/2] New qgroup creation / removal ioctl Sargun Dhillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).