Why we always balance system chunk alone with metadata?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux