From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: btrfs <linux-btrfs@vger.kernel.org>
Subject: Why we always balance system chunk alone with metadata?
Date: Wed, 16 Mar 2016 10:48:48 +0800 [thread overview]
Message-ID: <56E8C990.1010508@cn.fujitsu.com> (raw)
Hi,
During debugging a bug related to balancing metadata chunk, we found
that if we specify -m option for "btrfs balance", it will always balance
system chunk too.
cmds-balance.c:
---
/*
* allow -s only under --force, otherwise do with system chunks
* the same thing we were ordered to do with meta chunks
*/
if (args.flags & BTRFS_BALANCE_SYSTEM) {
if (!force) {
error(
"Refusing to explicitly operate on system
chunks.\n"
"Pass --force if you really want to do that.");
return 1;
}
} else if (args.flags & BTRFS_BALANCE_METADATA) {
args.flags |= BTRFS_BALANCE_SYSTEM; <<< Here
memcpy(&args.sys, &args.meta,
sizeof(struct btrfs_balance_args));
}
---
I'm curious why we always bind system chunk to metadata balance?
Is there any special reason?
The patch introducing such behavior is dated back to 2012, and this
makes us unable to do metadata *only* balance.
Any idea?
Thanks,
Qu
next reply other threads:[~2016-03-16 2:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 2:48 Qu Wenruo [this message]
2016-03-17 8:09 ` Why we always balance system chunk alone with metadata? Duncan
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=56E8C990.1010508@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--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).