[PATCH 2/5] Btrfs: count the chunks which will be relocated at first
- Subject: [PATCH 2/5] Btrfs: count the chunks which will be relocated at first
- From: Miao Xie <miaox@xxxxxxxxxxxxxx>
- Date: Thu, 17 May 2012 19:56:53 +0800
- Reply-to: miaox@xxxxxxxxxxxxxx
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1
the balance function should count the chunks which will be relocated at first,
and then relocate those chunks one by one.
Signed-off-by: Miao Xie <miaox@xxxxxxxxxxxxxx>
---
fs/btrfs/volumes.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 759d024..91da8a2 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2580,7 +2580,7 @@ again:
chunk = btrfs_item_ptr(leaf, slot, struct btrfs_chunk);
- if (!counting) {
+ if (counting) {
spin_lock(&fs_info->balance_lock);
bctl->stat.considered++;
spin_unlock(&fs_info->balance_lock);
--
1.7.6.5
--
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
[Linux NFS]
[Linux NILFS]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]