All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Qgroup uapi improvements
@ 2017-05-26 20:44 Sargun Dhillon
  2017-05-26 20:44 ` [PATCH v2 1/4] btrfs: Fail on removing qgroup if del_qgroup_item fails Sargun Dhillon
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Sargun Dhillon @ 2017-05-26 20:44 UTC (permalink / raw)
  To: linux-btrfs; +Cc: quwenruo, mkh

This patchset has several improvements around the qgroups user-facing
API. It 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.

In adddition, it adds a mount option "qgroup_auto_cleanup".
When this mount option is specified, qgroups will automatically
be cleaned up at volume deletion time. The reason this is a mount
option over a default behaviour is to avoid breaking old scripts
that rely on the behaviour of the existing APIs. Users can opt
into the new behaviour, as opposed it being an automated
trigger on newly created qgroups. Later on, we can introduce
a flag to subvol / qgroup create that marks the qgroup as
automatically created, and delete the qgroup as automatically
as well.

Changes since v1:
  * Remove creation of level-0 qgroups without subvol
  * Add deprecation message for old API

Sargun Dhillon (4):
  btrfs: Fail on removing qgroup if del_qgroup_item fails
  btrfs: Add new ioctl uapis for qgroup creation / removal
  btrfs: Warn the user when the legacy btrfs_qgroup_create API is used
  btrfs: Add qgroup_auto_cleanup mount flag to automatically cleanup
    qgroups

 fs/btrfs/ctree.h           |   1 +
 fs/btrfs/ioctl.c           | 117 ++++++++++++++++++++++++++++++++++++++++++++-
 fs/btrfs/qgroup.c          |  79 ++++++++++++++++++++++++++++--
 fs/btrfs/qgroup.h          |   6 ++-
 fs/btrfs/super.c           |  15 +++++-
 include/uapi/linux/btrfs.h |  22 +++++++++
 6 files changed, 230 insertions(+), 10 deletions(-)

-- 
2.9.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-06-30 16:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 20:44 [PATCH v2 0/4] Qgroup uapi improvements Sargun Dhillon
2017-05-26 20:44 ` [PATCH v2 1/4] btrfs: Fail on removing qgroup if del_qgroup_item fails Sargun Dhillon
2017-05-26 20:44 ` [PATCH v2 2/4] btrfs: Add new ioctl uapis for qgroup creation / removal Sargun Dhillon
2017-06-30 16:31   ` David Sterba
2017-05-26 20:44 ` [PATCH v2 3/4] btrfs: Warn the user when the legacy btrfs_qgroup_create API is used Sargun Dhillon
2017-06-30 15:59   ` David Sterba
2017-05-26 20:45 ` [PATCH v2 4/4] btrfs: Add qgroup_auto_cleanup mount flag to automatically cleanup qgroups Sargun Dhillon
2017-06-30 15:53   ` David Sterba
2017-06-23 17:05 ` [PATCH v2 0/4] Qgroup uapi improvements Sargun Dhillon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.