linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why we always balance system chunk alone with metadata?
@ 2016-03-16  2:48 Qu Wenruo
  2016-03-17  8:09 ` Duncan
  0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2016-03-16  2:48 UTC (permalink / raw)
  To: btrfs

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



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

end of thread, other threads:[~2016-03-17  8:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16  2:48 Why we always balance system chunk alone with metadata? Qu Wenruo
2016-03-17  8:09 ` Duncan

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).