From: Sargun Dhillon <sargun@sargun.me>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v3 0/2] New qgroup creation / removal ioctl
Date: Fri, 14 Jul 2017 15:09:31 +0000 [thread overview]
Message-ID: <20170714150929.GA17966@ircssh-2.c.rugged-nimbus-611.internal> (raw)
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
reply other threads:[~2017-07-14 15:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170714150929.GA17966@ircssh-2.c.rugged-nimbus-611.internal \
--to=sargun@sargun.me \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).