linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sargun Dhillon <sargun@sargun.me>
To: linux-btrfs@vger.kernel.org
Cc: quwenruo.btrfs@gmx.com, dsterba@suse.cz
Subject: [PATCH v2 0/1] Add qgroup_autoremove flag
Date: Sun, 17 Sep 2017 22:07:59 +0000	[thread overview]
Message-ID: <20170917220756.GA31512@ircssh-2.c.rugged-nimbus-611.internal> (raw)

This patch makes it so level-0 qgroups are automatically deleted. The
flag that enables this behaviour is persisted in btrfs_qgroup_status_item.
Although, it may make sense to introduce a btrfs_qgroup_configuration_item,
it seems somewhat overkill to do that just for one simple knob that can
fit into the existing flags.

The reason why this is a sysfs knob, and not a mount option is because
qgroups have to be enabled after the first mount. Having to do a mount,
enable qgroups, flip the knob, and then remounting seems somewhat more
awkward than this single sysfs knob.

Changes since v1:
 * Move from mount option to sysfs knob
 * Persist the knob across remounts

Sargun Dhillon (1):
  btrfs: Add mechanism to configure automatic level-0 qgroup removal

 fs/btrfs/ctree.h                |  2 +-
 fs/btrfs/ioctl.c                | 14 +++++++
 fs/btrfs/sysfs.c                | 91 ++++++++++++++++++++++++++++++++++++-----
 include/uapi/linux/btrfs_tree.h |  7 ++++
 4 files changed, 103 insertions(+), 11 deletions(-)

-- 
2.11.0


             reply	other threads:[~2017-09-17 22:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 22:07 Sargun Dhillon [this message]
2017-09-17 22:08 ` [PATCH v2 1/1] btrfs: Add mechanism to configure automatic level-0 qgroup removal Sargun Dhillon

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=20170917220756.GA31512@ircssh-2.c.rugged-nimbus-611.internal \
    --to=sargun@sargun.me \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /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).