All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/7] btrfs: Don't allow subvolid >= (1 << BTRFS_QGROUP_LEVEL_SHIFT) to be created
Date: Mon, 2 Mar 2015 16:50:44 -0500	[thread overview]
Message-ID: <54F4DB34.5000004@fb.com> (raw)
In-Reply-To: <1425025468-29749-3-git-send-email-quwenruo@cn.fujitsu.com>

On 02/27/2015 03:24 AM, Qu Wenruo wrote:
> Btrfs will create qgroup on subvolume creation if quota is enabled, but
> qgroup uses the high bits(currently 16 bits) as level, to build the
> inheritance.
>
> However it is fully possible a subvolume can be created with a
> subvolumeid larger than 1 << BTRFS_QGROUP_LEVEL_SHIFT, so it will be
> considered as level 1 and can't be assigned to other qgroup in level 1.
>
> This patch will prevent such things so qgroup inheritance will not be
> screwed up.
> The downside is very clear, btrfs subvolume number limit will decrease
> from (u64 max - 256(fisrt free objectid) - 256(last free objectid)) to
> (u48 max -256(first free objectid)).
> But we still have near u48(that's 15 digits in dec), so that should not
> be a huge problem.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>

Reviewed-by: Josef Bacik <jbacik@fb.com>

Thanks,

Josef

  reply	other threads:[~2015-03-02 21:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27  8:24 [PATCH 0/7] Qgroup status flag fix and semi-automatic qgroup update on relationship assign Qu Wenruo
2015-02-27  8:24 ` [PATCH 1/7] btrfs: Check qgroup level in kernel qgroup assign Qu Wenruo
2015-03-02 21:49   ` Josef Bacik
2015-03-19 17:49   ` David Sterba
2015-02-27  8:24 ` [PATCH 2/7] btrfs: Don't allow subvolid >= (1 << BTRFS_QGROUP_LEVEL_SHIFT) to be created Qu Wenruo
2015-03-02 21:50   ` Josef Bacik [this message]
2015-02-27  8:24 ` [PATCH 3/7] btrfs: qgroup: Fix dead judgement on qgroup_rescan_leaf() return value Qu Wenruo
2015-03-02 21:52   ` Josef Bacik
2015-02-27  8:24 ` [PATCH 4/7] btrfs: Update btrfs qgroup status item when rescan is done Qu Wenruo
2015-03-02 21:54   ` Josef Bacik
2015-02-27  8:24 ` [PATCH 5/7] btrfs: qgroup: clear STATUS_FLAG_ON in disabling quota Qu Wenruo
2015-03-02 21:55   ` Josef Bacik
2015-02-27  8:24 ` [PATCH 6/7] btrfs: quota: Automatically update related qgroups or mark INCONSISTENT flags when assigning/deleting a qgroup relations Qu Wenruo
2015-03-02 22:02   ` Josef Bacik
2015-02-27  8:24 ` [PATCH 7/7] btrfs: quota: Update quota tree after qgroup relationship change Qu Wenruo
2015-03-02 22:03   ` Josef Bacik

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=54F4DB34.5000004@fb.com \
    --to=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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 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.