]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/btrfs/extent-tree.c
Btrfs: allow balance to explicitly allocate chunks as it relocates
[mv-sheeva.git] / fs / btrfs / extent-tree.c
index d375fc04a06524b1d717454d99a4329c03a78798..100e409e9053410cdf3ac0f2a5d1fcb15e3a31d0 100644 (file)
@@ -8066,6 +8066,13 @@ out:
        return ret;
 }
 
+int btrfs_force_chunk_alloc(struct btrfs_trans_handle *trans,
+                           struct btrfs_root *root, u64 type)
+{
+       u64 alloc_flags = get_alloc_profile(root, type);
+       return do_chunk_alloc(trans, root, 2 * 1024 * 1024, alloc_flags, 1);
+}
+
 /*
  * helper to account the unused space of all the readonly block group in the
  * list. takes mirrors into account.